Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77144

Changing Windows DPI ("Make Everything Bigger") while QtWidgets app is running scales some elements but not others

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Incomplete
    • Affects Version/s: 5.12.2
    • Fix Version/s: None
    • Component/s: Widgets: Layout
    • Labels:
      None
    • Environment:
      Windows 10

      Description

      Noticed an issue recently in my app here:
      https://github.com/EspoTek/Labrador/releases

      Whenever the Windows Scale Factor (ie logical DPI) was changed while the app was running, the text would scale but not the widgets that contained them. It worked fine on dual-monitor setups with different DPI, though.
      I couldn't narrow down exactly why it was doing that, so I checked other DPI Aware Qt apps, built locally and downloaded. All showed the same behaviour, so I've figured the bug is a part of Qt.

      Steps to reproduce (Windows 10):

      • Ensure that your Scale Factor is set to 100%, under the "Make Everything Bigger" section of the Display Settings.
      • Run any Qt Widgets App that is DPI Aware (ie, the Qt::AA_EnableHighDpiScaling flag is enabled).
      • Note that everything looks OK (as per attached image 100%.png)
      • Once the app has launched, set the Scale Factor to 150%.
      • Note that the text is scaled, but the widgets containing the text are not. All menus are broken and text is cut off (as per attached image 150%_changedDuringLaunch.png)
      • Close and reopen the app.
      • Note that everything is rendered correctly at the larger scale (as per attached image 150%.png).

        Attachments

        1. 100%.png
          100%.png
          117 kB
        2. 150%_changedDuringLaunch.png
          150%_changedDuringLaunch.png
          156 kB
        3. 150%.png
          150%.png
          156 kB
        4. ApplicationFrameHost_YZscOJnkLu.png
          ApplicationFrameHost_YZscOJnkLu.png
          3 kB
        5. qtdiag
          11 kB

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              esposch esposch
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes