Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27837

Fusion style does not draw check boxes in combo box

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 5.0.0 Beta 1
    • None
    • Linux

    Description

      In a test app for accessibility I have a combo box which provides several choices for filters. These are checkable. Fusion style ignores the checkable state in the model it seems.
      Windows style and plastique draw these correct.

      QStandardItemModel *filerModel = new QStandardItemModel();
      QStandardItem *firstFilterItem = new QStandardItem(QString("Event Filter"));
      
      firstFilterItem->setFlags(Qt::ItemIsEnabled);
      filerModel->appendRow(firstFilterItem);
      
      QVector< EventType > filterList;
      filterList << StateChanged << NameChanged << DescriptionChanged << Window << Focus << Document << Object << Text << Table << Others;
      for(int i = 0; i < filterList.count(); ++i) {
          EventType t = filterList[i];
          QStandardItem* item = new QStandardItem(eventName(t));
          item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
          item->setData(QVariant::fromValue<EventType>(t), EventsModel::EventTypeRole);
          item->setData(Qt::Checked, Qt::CheckStateRole);
          filerModel->appendRow(QList<QStandardItem*>() << item);
      }
      
      m_ui.filterComboBox->setModel(filerModel);
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              frederik Frederik Gladhorn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes