Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
6.3.1
-
None
-
Intel MBP 2017, macOS 12.4, Windows 10
Description
In the attached project, the custom widgets are filled with a pattern with predefined scales:
void paintEvent( QPaintEvent* e ) override
{
QPainter p( this );
QBrush br = QBrush( Qt::blue, Qt::CrossPattern );
QTransform tr;
tr.scale( mScale, mScale );
br.setTransform( tr );
p.fillRect( e->rect(), br );
}
With Qt 5.15.2, the widgets have a correct scale of pattern:
- OK_qbrush_scale_mac_5.15.2.png
- OK_qbrush_scale_win_5.15.2.png
With Qt 6.3.1, the widgets have the same scale:
- FAIL_qbrush_scale_mac_6.3.1.png
- FAIL_qbrush_scale_win_6.3.1.png
Note, on macOS (retina screen) with Qt 6.3.1 the scale is even smaller than on Windows, while with Qt 5.15.2 they are equal.
QGraphicsScene and QGraphicsView are also affected, setBackgroundBrush method produces the same result.
Attachments
Issue Links
- duplicates
-
QTBUG-97849 QPainter ignores QBrush's scaling and rotation set with QTransform
-
- Closed
-