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

Controls in 5.3 not using custom palette regression

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.5.0 RC
    • 5.3.0
    • Quick: Controls 1
    • None
    • 58f9d467c22f7333f8a4e9f726655882c9c331a0

    Description

      My 5.2.0 application is successfully setting the Application style to Fusion followed by a custom dark palette, and the Quick Controls render as expected. Using Qt 5.3 on OS X, the controls do not render using the palette; they only seem to render using the style's palette. On Linux/X11, most things render using the custom palette but other things not. I have not tested on Windows. Here is a simple way to reproduce it. In the gallery example add the following code to the beginning of main.cpp:main():

      #include <QPalette>
      ...
          QApplication::setStyle("Fusion");
          QPalette palette;
          palette.setColor(QPalette::Window, QColor(50,50,50));
          palette.setColor(QPalette::WindowText, QColor(220,220,220));
          palette.setColor(QPalette::Base, QColor(30,30,30));
          palette.setColor(QPalette::AlternateBase, QColor(40,40,40));
          palette.setColor(QPalette::Highlight, QColor(23,92,118));
          palette.setColor(QPalette::HighlightedText, Qt::white);
          palette.setColor(QPalette::ToolTipBase, palette.color(QPalette::Highlight));
          palette.setColor(QPalette::ToolTipText, palette.color(QPalette::WindowText));
          palette.setColor(QPalette::Text, palette.color(QPalette::WindowText));
          palette.setColor(QPalette::BrightText, Qt::red);
          palette.setColor(QPalette::Button, palette.color(QPalette::Window));
          palette.setColor(QPalette::ButtonText, palette.color(QPalette::WindowText));
          palette.setColor(QPalette::Link, palette.color(QPalette::Highlight).lighter());
          palette.setColor(QPalette::LinkVisited, palette.color(QPalette::Highlight));
          QApplication::setPalette(palette);
      

      Attachments

        For Gerrit Dashboard: QTBUG-39800
        # Subject Branch Project Status CR V

        Activity

          People

            hhvaal Harald Hvaal
            ddennedy Dan Dennedy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes