Hi,
Has anyone a link to what is the policy in QComboBox for setting
the preselection (the current selected item at showing time) ?
As I have two comboboxes that I fill in the same way
cbb->addItem("String", myInt)
cbb->addItem("String", myInt)
To copy to clipboard, switch view to plain text mode
, and I don't use setCurrentIndex.
I get the first combo pre-selecting the first item and
the second combo pre-selecting none.
What triggers the pre-selection ?
Thanks in advance.
Edit: it appears that, in fact, the second combo has its first line selected,
but as it is an empty line I thought it was not (selected).
So my question becomes (as I tried setCurrentIdx(-1)) :
how do I make a not editable combobox select no item ?
Bookmarks