You can check the dpi of the screen: QGuiApplication::primaryScreen()->logicalDotsPerInch();
You can then check if the dpi is above certain threshold to do thing differently. Normal desktop full HD screen dpi is around 96. [36E56279] une compagnie [cid:image002.jpg@01D4DD94.AA6DD510] RAPPROCHEZ LA DISTANCE Jérôme Godbout Développeur Logiciel Sénior / Senior Software Developer p: +1 (418) 800-1073 ext.:109 amotus.ca<http://www.amotus-solutions.com/> statum-iot.com<http://statum-iot.com/> [cid:image003.png@01D4DD94.AA6DD510]<https://www.facebook.com/LesSolutionsAmotus/> [cid:image004.png@01D4DD94.AA6DD510] <https://www.linkedin.com/company/amotus-solutions/> [cid:image005.png@01D4DD94.AA6DD510] <https://twitter.com/AmotusSolutions> [cid:image006.jpg@01D4DD94.AA6DD510] <https://www.youtube.com/channel/UCoYpQgsmj1iJZyDjTQ3x8Ig> From: Interest <interest-boun...@qt-project.org> On Behalf Of Vadim Peretokin Sent: March 18, 2019 1:00 PM To: interestqt-project.org <interest@qt-project.org> Subject: [Interest] How to detect a HiDPI display with Qt? I'm not clear on how to detect if a display is HiDPI with Qt. I've tried QApplication.desktop()->screen()->devicePixelRatio() but even that returns 1 for a display that is 3840x2160. Has anyone got hints on how to do this successfully?
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest