[Interest] DPI
igor.mironchik at gmail.com
igor.mironchik at gmail.com
Sun Feb 23 17:17:59 CET 2014
You are right.
QScreen is more reliable than QDesktopWidget.
At least QScreen makes calculations, handles system's calls, etc...
-----Original Message-----
From: Allan Sandfeld Jensen
Sent: Sunday, February 23, 2014 4:54 PM
To: igor.mironchik at gmail.com
Cc: interest at qt-project.org ; Andre Somers
Subject: Re: [Interest] DPI
On Sunday 23 February 2014, igor.mironchik at gmail.com wrote:
> QScreen::physicalDotsPerInch returns the same value as
> QDesktopWidget::physicalDpi.
>
> But why do you think that QScreen::physicalDotsPerInch more reliable?
>
> P.S. I did not look at the Qt code yet, but I guess that I have to do
> it...
>
QScreen is a more direct source, and it has more raw data. A QWidget can
have
been moved from one screen to another, or overlap multiple screens, all
making
its screen specific information less direct and more error-prone.
Too bad QScreen didn't have the information you needed though.
`Allan
More information about the Interest
mailing list