Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7
-
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