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

QPalette::Base is translucent in Windows 11

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 6.8.1
    • GUI: Look'n'Feel
    • None
    • Windows

    Description

       

      Hi, 

      I find that QPalette::Base is a translucent color on Windows 11. I would expect this to be a solid color (for example, white, when the system theme is light).

      This causes problems during painting, as if I paint using the base color on top of a widget whose background is also a base color, the colors overlay each other creating a grey hue. 

      Steps to reproduce:

      qDebug() << qApp->palette().base().color();

      Output:

      QColor(ARGB 0.701961, 1, 1, 1)

      I assume this is a bug, but not sure... It causes problems if I try to paint on top of a widget with base color background, as I would expect the base color in my painting to be invisible, but instead the alpha gets multiplied and it shows up as pale grey. In general I would expect the "base" color to be a solid color rather than a transparent color.

      I've attached a screenshot with code showing how widgets with a base color generate grey areas. I would expect this widget to be entirely white.

      Best wishes,

      Mick

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mick2 Mick Elliot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes