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

QListWidget can't set colors like in previous versions

    XMLWordPrintable

Details

    Description

      I have the new RC of Qt 4.70 installed and the new version works different as the previous 4.6x versions. I want to colorize the background of a QListWidget. I'm using this code for this purpose:

      QListWidget *Widget = new QListWidget();
      Widget->addItems(QStringList() << "Item 1" << "Item 2" << "Item 3");

      QPalette palette;
      palette.setBrush(QPalette::Active, QPalette::Base, QColor(255, 190, 190)); // setColor don't works too
      Widget->setPalette(palette);
      Widget->show();

      In Qt 4.6x the background will be completely red with all items, with Qt 4.70 all items will be white and the unused background will be red. I found no way to fix this with QPalette if this is a new behaviour, so I think this is a bug.
      For better understanding here a picture: http://www.myimg.de/?img=Qtfd77b.png

      Attachments

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

        Activity

          People

            bachewii Jens
            hefeweizen Michael Mense
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes