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

Regression with stylesheet in Qt 6.8.2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.8.2
    • GUI: Look'n'Feel
    • None
    • All

    Description

      Prior to Qt 6.8.2, when the app had a stylesheet that didn't affect a kind of widget, that widget was drawn by the platform QStyle. With Qt 6.8.2, even if you give an app a stylesheet like " ", e.g., with

      APP -stylesheet " "
      

      it'll damage the platform style. The damage may not be visible in styles like Fusion, but it can be nasty with other styles.

      For example, QStyleSheetStyle::drawControl does this in CE_ComboBoxLabel, even when there's nothing about a combobox in the stylesheet: It takes SC_ComboBoxEditField, draws the icon at its start, and draws the text after it with the text palette. This may seem OK with Fusion, but another style (like Kvantum) may do something quite different, by giving different text colors to different states of a combobox, adding custom margins to its icon/text, setting the frame width, making frames completely rounded ..., all of which are ruined by Qt 6.8.2 + any stylesheet.

      There are several other examples too. The point is that, if a stylesheet isn't about a widget, it shouldn't touch it — as it never did before 6.8.2.

      Attachments

        Issue Links

          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
              tsujan Tsu Jan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes