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

Widgets and fonts have wrong size after moving to screen due to disconnect with different DPI when dpiawareness = 2

    XMLWordPrintable

Details

    • Windows
    • d10c34b0cc896c711fce8ae5629e3cc3d74b6452 (qt/qtbase/5.15.2)

    Description

      I have a laptop with 15" 4k screen (pixel ratio is 3) and external Full HD 23" display (pixel ratio is 1). I configured the Display Settings of the OS to use only external display when it is connected and to use 250% scaling for the 4k display.

      So, if I launch an application and then connect or disconnect the external display, all applications get moved to a screen with different DPI. This results in wrong sizes for some widgets in fonts. I see from logs, that application uses dpiawareness = 2 which is default.

      I compiled the Validator example from the Qt distribution. I attached screenshots for application started at low DPI and at high DPI screen and what application looks like after move to high and low DPI screen (by connecting/disconnecting the external display).

       Steps to reproduce:

      • Connect HIgh DPI Monitor to Laptop
      • In display settings, toggle Mode from "Show only on1"/"Show only on2"

      Attachments

        1. High_DPI.png
          High_DPI.png
          37 kB
        2. High_to_Low_AA_scaling.png
          High_to_Low_AA_scaling.png
          10 kB
        3. High_to_Low_DPI.png
          High_to_Low_DPI.png
          24 kB
        4. Low_DPI.png
          Low_DPI.png
          19 kB
        5. Low_to_High_AA_scaling.png
          Low_to_High_AA_scaling.png
          21 kB
        6. Low_to_High_DPI.png
          Low_to_High_DPI.png
          34 kB
        7. qtbug76902_diag.diff
          6 kB
        8. qtbug76902_fixed_log.txt
          0.6 kB
        9. qtbug76902_log.txt
          4 kB
        10. qtbug76902.zip
          3 kB

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              nkrupenko.nvidia Nikita Krupenko
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: