QListWidgetItem activate first item
-
wrote on 29 Jun 2017, 10:34 last edited by
Hi,
I am stuck in the activation of the first item from a QListWidget. I am using setCurrentRow method which already works for the rest of the items but not for the first one. Debugging I can know that the first item is already selected and activated but in the list widget is not highlighted in blue as it does when the item is activated.
Thank you in advance
-
wrote on 29 Jun 2017, 12:11 last edited by
listWidget->selectionModel()->setCurrentIndex(listWidget->model()->index(0,0));
-
wrote on 29 Jun 2017, 13:51 last edited by
Thanks for your answers. Both solutions are working for the rest of the items but not for the first one... :(
-
wrote on 29 Jun 2017, 13:59 last edited by
Could you show your code?
-
wrote on 3 Jul 2017, 08:47 last edited by
I solved the problem. It was a bug...
Thanks for your help and patience!!
5/6