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

Handling High DPI scaling in a platform independent way



  • I have a dialog that is created in Designer where it looks like this:

    80609f07-a765-4de9-8523-b58c04384f78-image.png

    If I run my application with Windows "Scale and Layout" set to 100% is is displayed correctly. However if "Scale and Layout" is set to 150% (for example) it's not wide enough and it displays thus:

    76a08cde-9fbe-4e4a-85fd-055f764550bb-image.png

    How should I set the width of the control so it displays correctly when the "Scale and Layout" is changed and do so regardless of whether the application is running on Windows/Mac/Linux? I don't in general ever wish to see a horizontal scroll bar ...


  • Lifetime Qt Champion

    Then don't put your widget into a scrollarea - why do you need this?
    Also we don't know what layout settings you used for your group boxes. Looks like they've a fixed size.



  • I want it in a scroll area for Vertical Scrolling only


  • Lifetime Qt Champion

    Then properly set your size constraints for your widgets as I already told you


Log in to reply