Menu

#361 Uneven grid lines in Qt6

open
nobody
None
5
2023-01-05
2023-01-05
Anonymous
No

Hello,

My application is using QwtPlot and running on Windows 10/11. I ported it from Qt5 to Qt6, then I saw the grid lines had uneven line width. You have to set display scaling other than 100% to see this issue. (In Windows, right click on desktop and select Display Settings to change the scaling). To fix this issue, I added the following to QwtPlotGrid::draw().

minorPen.setCosmetic(true);
majorPen.setCosmetic(treu);

It seems me that Qt6 treats display scaling different from Qt5 and like one of the transformation so that we have to use Cosmetic Pens. I'm not sure this is a bug of Qt6 or specification changes.

Thanks.

FYI. I'm using
Qt 5.15.2, 6.2.4
qwt 6.2.0
Visual C++ 2022

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB