Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
i just want to select item 3 of listwidget and it seems that @ui->listwidget->setCurrentItem(3);@
won't work. I know a way to do it if i create a list of the items but it is about in 6 lines just to select an item..
You might try via the selectionModel().
could you please be a little more detailed? at list one link to know where to look up...?
Check [[doc:QAbstractItemModel]] for the selectionModel() method, and [[doc:QItemSelectionModel]] for the documentation of the selection model itself.
Well i prefered doing it this way as 1 row has 1 item: @ ui->listWidget_2->setFocus(); ui->listWidget_2->setCurrentRow(2);@
:)