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

tst_QStyleSheetStyle::background does not adapt to system changes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7
    • Widgets: Style Sheets
    • None

    Description

      The background() test is testing for the presence of a specific color in a gradient. Since the actual rendered gradient depends on the size of the combo box component, it has an error margin of 50 when comparing the color. This is not always sufficient, for instance if font metrics change (https://codereview.qt-project.org/c/qt/qtbase/+/563751/) or if the system dpr is set to something different from 100%.

      After https://codereview.qt-project.org/c/qt/qtbase/+/558424 this can easily be reproduced on Windows by setting the system scale factor to 125%. The test will fail with the following:

      FAIL! : tst_QStyleSheetStyle::background() 'testForColors(image, QColor(0xe8, 0xff, 0x66))' returned FALSE. (2 QDialog did not contain background image with color #e8ff66)
      E:\dev\qt6-dev\base\tests\auto\widgets\styles\qstylesheetstyle\tst_qstylesheetstyle.cpp(1159) : failure location

      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
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes