Hello
Please tell me how to select multiple items in combo box.
Regards
pranjali nagpure
Printable View
Hello
Please tell me how to select multiple items in combo box.
Regards
pranjali nagpure
From the QComboBox documentation:
QComboBox is single selection only. Think about it - if you could make it multiple selection, how would you display the result once the drop-down is closed?Quote:
Note that you cannot alter the SelectionMode of the view(), e.g., by using setSelectionMode().
I suggest you substitute QListWidget or QListView in your GUI if you want multiple / extended selection mode.
Hi, Qwt has QxtCheckComboBox for this.
Ginsengelf
ok. I was facing the same issue.. thanks for post
@Ginsengelf means "Qxt", not "Qwt". In any case, it is based on Qt4, is no longer maintained, and as the Qxt website itself says:
So, depending on how much of QxtCheckComboBox is based on undocumented internals of Qt, and how much those internals have changed between Qt4 and Qt5, you may not be able to use it at all.Quote:
Qxt will likely not work with newer Qt versions due to usage of internal api. We recommend that you pick out the parts you want instead of using the entire libqxt.
The biggest change from Qt4 -> Qt5 is the removal of all OS-dependent GUI code from widget implementations into window-system-specific plugins. Since the combo box is a GUI widget, the Qt4 internal implementation is probably greatly different.
You might have better luck finding something in KDE. Check out the qinclude.org site for all sorts of Qt libraries.