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

refression: QComboBox doesn't respect the item data's BackgroundRole in QCleanlooksStyle

    XMLWordPrintable

Details

    • 08d1eb4f79b9d633b97987cc55f618e6dd05e291

    Description

      This worked with 4.4.x, but from 4.5 the combobox doesn't respect the BackgroundRole in cleanlooks style.
      Here is the code to test:

      #include <QtGui>
      
      int main(int argc, char** argv) {
              QApplication app(argc, argv);
              app.setStyle(new QCleanlooksStyle);
              QWidget mw;
              QVBoxLayout *layout = new QVBoxLayout;
              QComboBox * comboBox = new QComboBox;
              layout->addWidget(comboBox);
              mw.setLayout(layout);
      
              comboBox->setEditable(true);
              comboBox->addItem("yellow");
              comboBox->addItem("green");
              comboBox->setItemData(0, Qt::yellow, Qt::BackgroundRole);
              comboBox->setItemData(1, Qt::green, Qt::BackgroundRole);
              qWarning() << qApp->style();
      
      
              mw.show();
              app.exec();
      }
      
      
      

      Attachments

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

        Activity

          People

            bachewii Jens
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes