I have a subclass of QAbstractListModel containing items consisting of a name (QString) and a boolean. The model returns the name as Qt::DisplayRole, and the boolean as Qt::CheckStateRole. I then use this model in a list view.
But i would also like to use the same model for combo boxes. This is in the same UI, using the same data but in two different views.
The problem is that although the list view displays the check boxes for each item, the combo box does as well. Is there any way i can set it to not show these? Or will i have to use a separate model for the combo boxes?
Bookmarks