Can Widget Applications on the Mac and Windows Be DPI-Aware?
-
On super high resolution monitors, is there a way to make widget applications DPI-aware? Or, is it a bad practice to make an app with drag/drop widgets if you want them to be DPI-aware?
(Background: I created a widget application and am a noob to Qt/C++, and have been teaching myself C++.)
-
Hello! And welcome to the forums!
As far as I see, you can act depending on the DPI, yes.
QPaintDevice gives you information pertinent with QPaintDevice::logicalDpiX() QPaintDevice::logicalDpiY() QPaintDevice::widthMM() and QPaintDevice::heightMM()
You can also you can use QApplication and have a call to desktop()->logicalDpiX() for example..Hope I managed to express myself correctly.
Regards! -