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

CE_ComboBoxLabel painting not called anymore on QProxyStyle, due to QStyleSheetStyle

    XMLWordPrintable

Details

    • db07a0387 (dev), eae538fa0 (6.10), e2bfcd58e (6.9), 3926d56a9 (tqtc/lts-6.8)

    Description

      The CE_ComboBoxLabel painting of the base style or any QProxyStyle sitting on top of it, is not called anymore, due to the recent removal of the check for any valid CSS rules at the beginning of the CE_ComboBoxLabel painting in the QStyleSheetStyle.
      This results in the CSS style always doing the painting, even when no CSS is applied to the combobox at all.
      In the past the check   if (!rule.hasBox()) ensured that at the end of the function baseStyle()->drawControl() was called, now we never get to it.

      This is a regression that got introduced by the fix for: QTBUG-131761 - Incorrect display of :selected state of QCombobox on "windows" style plugin
      https://codereview.qt-project.org/c/qt/qtbase/+/609484/2/src/widgets/styles/qstylesheetstyle.cpp

      Removed CSS check:

      case CE_ComboBoxLabel:        
          if (!rule.hasBox()) // <- check for CSS has been removed, QStyleSheetStyle now always paints
              break; 

       

      Attachments

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

        Activity

          People

            chehrlic Christian Ehrlicher
            roman_w Roman Woelker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: