Priority: P2: Important
Affects Version/s: 5.13.1
Fix Version/s: None
Component/s: GUI: Painting
If you set some clipping (pure integer coordinates, something like 0,0,20,20) and you have some fractional scaling like via QT_SCALE_FACTOR="1.2" the clipping will cut way one pixel to many for some bad rounding cases.
One can workaround by just converting the QRect into some QRectF and calling the QRectF overload instead of the QRect one.
But that setClipRect misbehaves in such a way is neither documented nor expected.
Screenshots with illustration of the problem in the linked comment, difference between the shots is just the QRect => QRectF conversion, integral coordinates/widths/heights.
|For Gerrit Dashboard: QTBUG-78962|
|278047,4||Fix: QPainter off-by-one clipping for some non-integer scalings||5.14||qt/qtbase||Status: MERGED||+2||0|