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.mironc...@gmail.com Cc: interest@qt-project.org ; Andre Somers Subject: Re: [Interest] DPI On Sunday 23 February 2014, igor.mironc...@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 _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest