1 Attachment(s)
Cannot select an item in QComboBox
Hello,
I've got a weird error in that I have a QComboBox which has been populated by a LocationTableModel class (which inherits from QAbstractTableModel). It gets populated with a couple of items upon my application loading but when I go to select an item the item list that drops down just stays visible not letting me click on an item :(
If I move away from the QComboBox and click somewhere else onscreen then the list disappears (as expected). But, as stated already, I cannot select a list item. Generally for other QComboBoxes and models I haven't had problems. Any ideas? I'm not sure what kind of info to provide to explain the prob better so I've just included the LocationTableModel.cpp file. My best guess was that I was doing something stupido in the data() method.
Regards,
Declan
Re: Cannot select an item in QComboBox
Make LocationTableModel::flags() return Qt::ItemIsEnabled (together with the selectable flag) also for valid indices.
Re: Cannot select an item in QComboBox
Thanks a million, jpn. That's done the job nicely!
Kind regards,
Declan