Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Screen Resolution



  • Hi friends,

    I am using QFrame setting minimum width 100 it should resize according to Resolution how can i set.

    I am setting QApplication::setAttribute(Qt::AA_EnableHighDpiScaling) but it is not working in windows.


  • Lifetime Qt Champion

    Hi,

    100px is the same value whether you have a screen in SD, HD or UHD resolution.

    For example, if you want your frame to always be at least one third of the screen, then you have to get the resolution of the screen and make its size one third of that.


Log in to reply