Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QComboBox with groups?
Dan203 last edited by
Is there an easy way to add subcategories to a QComboBox's drop down? Something like this...
JonB last edited by JonB
Not that I know of. You would have to roll your own code. A
QListViewfor the items:
QComboBox uses the model/view framework for its popup list and to store its items. By default a QStandardItemModel stores the items and a QListView subclass displays the popuplist.
and that does not support these "categories". You might be able to use
setModel()) to introduce your own view, with either your own layout (
QStyledItemDelegate) and/or perhaps a