Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Handling High DPI scaling in a platform independent way
Qt 6.11 is out! See what's new in the release blog

Handling High DPI scaling in a platform independent way

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 372 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by
    #1

    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 ...

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by
        #3

        I want it in a scroll area for Vertical Scrolling only

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved