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

Regression with stylesheet in Qt 6.8.2

XMLWordPrintable

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

      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.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            tsujan Tsu Jan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes