Hi,
I have a dialong that when pupping up,it will populate some lists by loading data from a file.
I have a Label, in which some selected items from the lists are shown.
The problem is, that when the dialog loads, all selections are done programmatically - with no user input, and everything I tried in order to read the current items from the list doesn't work.
The label will update only after I click or use keyboard on the lists.
Here is what I tried:
Setting the current item with:
setCurrentItem();
satCurrentRow();
setCurrentIndex(); -> which actually should work if one follows the docs since:
void QAbstractItemView::setCurrentIndex ( const QModelIndex & index ) [slot]

Sets the current item to be the item at index. Depending on the current selection mode, the item may also be selected. Note that this function also updates the starting position for any new selections the user performs.

To set an item as the current item without selecting it, call
So I would expect, that myList->currentItem() will retrieve that item.
But it doesn't.
Is there a way to select an item in a QListWIdget programmatically?
It must be possible - doesn't it?