Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
4.8.5
-
None
-
Ubuntu 12.04
Description
I try to display checkbox in a combobox. So I've write some code like this :
#include <QtGui/QApplication> #include <QtGui/QStandardItemModel> #include <QtGui/QComboBox> int main(int argc, char *argv[]) { QApplication a(argc, argv); QStandardItemModel *model = new QStandardItemModel(); for (int i =0; i < 5 ; i++) { QStandardItem* item = new QStandardItem(QString("item %1").arg(i)); item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled); item->setData(Qt::Unchecked, Qt::CheckStateRole); model->setItem(i, 0, item); } QComboBox *comboBox = new QComboBox(); comboBox->setModel(model); comboBox->show(); return a.exec(); }
The checkboxes are correctly displayed on Windows or Kubuntu but not on Ubuntu (12.10). If I change the default style to Plastique or Motif, the checkbox are displayed. A bug in the GtkStyle ?
Attachments
Issue Links
- duplicates
-
QTBUG-19683 QCleanlooksStyle is the only style not drawing checkboxes in QComboBox
- Closed
-
QTBUG-60310 Check Box in QComboBox is not drawn in case of "Fusion" Style
- Closed