[Interest] QPixmap::scroll() is not HiDPI-aware?

Nikos Chantziaras realnc at gmail.com
Mon Dec 31 01:53:02 CET 2018


When I use QPixmap::scroll() it does not take the devicePixelRatio() of 
the pixmap into account, so the passed values need to be scaled 
beforehand. However, there is no QPixmap::scroll() overload that takes 
floating point arguments. It only takes integers. So when scaling the 
passed values by the DPR, they will be inaccurate when the DPR is 
fractional (like 125%, 150% and 175% scaling on Windows instead of 200%, 
or fractional screen scaling in KDE.)

Was this intended or is it an oversight, and is there a recommended 
approach for doing a HiDPI QPixmap::scroll()?




More information about the Interest mailing list