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

Dpi Scaling affect line width.

    XMLWordPrintable

Details

    • Windows

    Description

      Customer informed us about line width changes with different scaling settings:
      "Depending on DPI scaling settings of the operating system, lines that are intended to be cosmetic (e.g. a thin rectangle frame) may be drawn with different pixel widths for different sides of the same rectangle, which looks really ugly.

      A quick search has not revealed any properties that allow me to specify a border as "cosmetic". Since the border width is int, I also cannot specify a fraction to correct the DPI scaling (and I also don't know how to get the current DPI scaling factors in QML in order to calculate the correction factor).
      The same problem applies to other areas of line drawing, e.g. ShapePath"

      Example pictures and project attached.

      Tested with Qt 6.4.2

      Attachments

        1. 100.PNG
          100.PNG
          4 kB
        2. 125.PNG
          125.PNG
          5 kB
        3. 150_recommended.PNG
          150_recommended.PNG
          6 kB
        4. 175.PNG
          175.PNG
          8 kB
        5. 200.PNG
          200.PNG
          10 kB
        6. 225.PNG
          225.PNG
          12 kB
        7. 250.PNG
          250.PNG
          13 kB
        8. 300.PNG
          300.PNG
          18 kB
        9. qt_dpiScalingLineWidth_100.png
          qt_dpiScalingLineWidth_100.png
          3 kB
        10. qt_dpiScalingLineWidth_125.png
          qt_dpiScalingLineWidth_125.png
          5 kB
        11. qt_dpiScalingLineWidth_150.png
          qt_dpiScalingLineWidth_150.png
          6 kB
        12. qt_dpiScalingLineWidth_175.png
          qt_dpiScalingLineWidth_175.png
          7 kB
        13. qt_dpiScalingLineWidth_200.png
          qt_dpiScalingLineWidth_200.png
          9 kB
        14. qt_test_DpiLineWidth.zip
          2 kB

        Issue Links

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

          Activity

            People

              oulu_hillbilly Sami Varanka
              tero.pelkonen Tero Pelkonen
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes