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

Reg->5.15 [Vista Style]QStyle::standardPalette returns empty QPalette

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.15.0
    • GUI: Look'n'Feel
    • None
    • Windows

    Description

      Most of my application uses the Fusion style with a custom QPalette (set with qApp->setStyle() and qApp->setPalette()), however I set some specific widgets to the system style/palette using QStyleFactory::create(QStringLiteral("windowsvista")) and QStyle::standardPalette(). This works as expected in Qt 5.14.2 and lower, but has stopped working in Qt 5.15.0.

      The issue appears to be that QStyle::standardPalette() now returns an empty QPalette where it didn't before. Here is QDebug output from both versions:

      Qt 5.14.2:

      QPalette(resolve=0x1d3fff,WindowText:[Active:0xff000000,Disabled:0xff787878,Inactive:0xff000000],Button:[Active:0xfff0f0f0,Disabled:0xfff0f0f0,Inactive:0xfff0f0f0],Light:[Active:0xffffffff,Disabled:0xffffffff,Inactive:0xffffffff],Midlight:[Active:0xffe3e3e3,Disabled:0xfff7f7f7,Inactive:0xffe3e3e3],Dark:[Active:0xffa0a0a0,Disabled:0xffa0a0a0,Inactive:0xffa0a0a0],Mid:[Active:0xffa0a0a0,Disabled:0xffa0a0a0,Inactive:0xffa0a0a0],Text:[Active:0xff000000,Disabled:0xff787878,Inactive:0xff000000],BrightText:[Active:0xffffffff,Disabled:0xffffffff,Inactive:0xffffffff],ButtonText:[Active:0xff000000,Disabled:0xff787878,Inactive:0xff000000],Base:[Active:0xffffffff,Disabled:0xfff0f0f0,Inactive:0xffffffff],Window:[Active:0xfff0f0f0,Disabled:0xfff0f0f0,Inactive:0xfff0f0f0],Shadow:[Active:0xff696969,Disabled:0xff000000,Inactive:0xff696969],Highlight:[Active:0xff0078d7,Disabled:0xff0078d7,Inactive:0xfff0f0f0],HighlightedText:[Active:0xffffffff,Disabled:0xffffffff,Inactive:0xff000000],AlternateBase:[Active:0xffe9e7e3,Disabled:0xfff7f7f7,Inactive:0xffe9e7e3],ToolTipBase:[Active:0xffffffdc,Disabled:0xffffffdc,Inactive:0xffffffdc],ToolTipText:[Active:0xff000000,Disabled:0xff000000,Inactive:0xff000000],PlaceholderText:[Active:0x80000000,Disabled:0x80000000,Inactive:0x80000000])

      Qt 5.15:

      QPalette(resolve=0x0,)
      

       

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            mattkc Matt KC
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: