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

HighDPI: Using QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough with fractional scaling yields cosmetic issues

    XMLWordPrintable

Details

    Description

      My setup is as follows:

      Windows10
      Monitor 1: 3840x2160 resolution, 150% scaling
      Monitor 2: 1920x1200 resolution, 100% scaling

      Using the QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough causes issues on both monitors. Mostly it has to do with rendering/painting of simple widget controls. I ran into these issues while using the Assistant and Designer applications. The issues include the following:

       

      1. Focus around QLineEdit controls (see attachment)
      2. Hovering over QPushButton controls (see attachment)
      3. QCheckBox is bigger than it needs to be (see attachment)
      4. Checkmark in a QCheckBox looks fuzzy (see attachment) (on both monitors)
      5. Arrows in QComboBox controls looks fuzzy (see attachment) (on both monitors)
      6. Fonts on the native QFileDialog do not respect scaling (see attachment) (on both monitors)
      7. Designer MDI Child window's close and minimize buttons are not properly resized when the application is moved from Monitor 1 to Monitor 2

       

      After more testing, it appears similar issues exist with rendering controls when using Ceil, Round, Floor and RoundPreferFloor values for QT_SCALE_FACTOR_ROUNDING_POLICY. Also, turning on the "Fix scaling for apps" option on Windows 10 causes additional scaling issues.

      Monitor Output from qtdiag.exe

      Screens: 2, High DPI scaling: active

      1. 0 "\\.\DISPLAY3" Depth: 32 Primary: yes
        Manufacturer:
        Model:
        Serial number:
        Geometry: 2560x1440+0+0 (native: 3840x2160+0+0) Available: 2560x1409+0+0
        Virtual geometry: 5760x1440+0+0 Available: 5760x1409+0+0
        2 virtual siblings
        Physical size: 600x340 mm Refresh: 60 Hz Power state: 0
        Physical DPI: 108.373,107.576 Logical DPI: 96,96 (native: 144,144) Subpixel_RGB
        High DPI scaling factor: 1.5 DevicePixelRatio: 1.5 Pixel density: 1
        Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0
      1. 1 "\\.\DISPLAY2" Depth: 32 Primary: no
        Manufacturer:
        Model:
        Serial number:
        Geometry: 1920x1200+3840+0 Available: 1920x1170+3840+0
        Virtual geometry: 5760x1440+0+0 Available: 5760x1409+0+0
        2 virtual siblings
        Physical size: 518x324 mm Refresh: 60 Hz Power state: 0
        Physical DPI: 94.1467,94.0741 Logical DPI: 96,96 Subpixel_RGB
        High DPI scaling factor: 1 DevicePixelRatio: 1 Pixel density: 1
        Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0

       

      Attachments

        1. image-2019-11-20-10-34-01-791.png
          image-2019-11-20-10-34-01-791.png
          54 kB
        2. image-2019-11-20-10-35-58-679.png
          image-2019-11-20-10-35-58-679.png
          54 kB
        3. image-2019-11-20-10-37-15-151.png
          image-2019-11-20-10-37-15-151.png
          28 kB
        4. image-2019-11-20-10-39-35-263.png
          image-2019-11-20-10-39-35-263.png
          27 kB
        5. image-2019-11-20-10-43-01-401.png
          image-2019-11-20-10-43-01-401.png
          90 kB
        6. image-2019-11-20-13-00-10-753.png
          image-2019-11-20-13-00-10-753.png
          93 kB
        7. image-2019-11-20-16-15-03-401.png
          image-2019-11-20-16-15-03-401.png
          202 kB
        8. main.cpp
          3 kB
        9. scaling-combobox.gif
          scaling-combobox.gif
          119 kB
        10. scaling-context-move.gif
          scaling-context-move.gif
          102 kB
        11. scaling-issue.gif
          scaling-issue.gif
          750 kB
        12. screenshot-6.png
          screenshot-6.png
          59 kB

        Issue Links

          Activity

            People

              axelspoerl Axel Spoerl
              shapochniky Yan Shapochnik
              Votes:
              19 Vote for this issue
              Watchers:
              35 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d