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

setAlternatingRowColors() does not work in a subclassed QTableWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • Some future release
    • 4.7.0
    • None
    • Ubuntu 10.04 (amd64); 64bit Intel CPU + Intel GMA graphics.

    Description

      I've been developing an app in Qt 4.6.3, and have recently switched to 4.7.0-RC1. I have created two widgets by subclassing QTableWidget, in both the method setAlternatingRowColors() works when compiled with Qt4.6.3, but doesn't work under 4.7.0-RC1 (background is completely white).

      Here's the code from one of the widgets:
      const QColor tempCol1(25, 120, 10, 100);
      const QColor tempCol2(80, 20, 10, 80);

      QPalette tempPal;
      tempPal.setColor(QPalette::Base, tempCol1);
      tempPal.setColor(QPalette::AlternateBase, tempCol2);

      setPalette(tempPal);

      I've added a .zip with source code. When launched with "-style windows", alternating row colours are shown, so it might be more of QStyle Linux issue, than setAlternatingRowColors().

      Attachments

        1. Scheduler.zip
          140 kB
          Tomasz Siekierda
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bachewii Jens
            sierdzio Tomasz Siekierda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes