I have a QCombox and in the combobo a TreeWidget
comboBox->setModel(treeWidget->model());
comboBox->setView(treeWidget);
comboBox->setModel(treeWidget->model());
comboBox->setView(treeWidget);
To copy to clipboard, switch view to plain text mode
Now I want to pre select an item in this treeWidget
treeWidget->scrollToItem (Item);
treeWidget->setCurrentItem(Item);
treeWidget->scrollToItem (Item);
treeWidget->setCurrentItem(Item);
To copy to clipboard, switch view to plain text mode
But for some reason, it doesn't select the Item.
In the combobox is still the first toplevelItem visible and when I click on the combobox he opens the correct toplevelitem, where Item is placed, but it's not selected.
Is it a bug, or am I on the wrong way?
Bookmarks