How to simulate a double-click element in qlistWidget

How can I simulate a double-click on an element in a QListWidget without a subclass? I would like the item to immediately go into edit mode when I add a new item to the list.

+4
source share
2 answers

Is void QListWidget::editItem ( QListWidgetItem * item ) suitable for this method?

+3
source

This is how you add a double click function

 connect(ui->listWidget,SIGNAL(itemDoubleClicked(QListWidgetItem*)),this,SLOT(on_dbclick_play())); 

where on_dbclick_play() is the function you want to call when double-clicking.

+1
source

Source: https://habr.com/ru/post/1437951/


All Articles