[Interest] DPI

Andre Somers andre at familiesomers.nl
Sun Feb 23 12:30:52 CET 2014

igor.mironchik at gmail.com schreef op 23-2-2014 13:24:
> Hi.
> I want to determine how much pixels in 10 mm.
> I use the next calculations:
> staticconstqrealfingerSize=0.0393700787*10;
> staticconstqrealh= 
> (qreal)QApplication::desktop()->physicalDpiY()*fingerSize;
> And this calculations return to me 28 that on my desktop is 5 mm only.
> 0.0393700787 is how  much inches in millimeter...
> What am I doing wrong?
Are you sure that the right physicalDpi is returned? That is not a value 
you can absolutely rely on.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140223/2f649f8e/attachment.html>

More information about the Interest mailing list