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

Qt 6 font scaling problems QWidgets on Windows 10

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.4.2
    • 6.0, 6.1, 6.2.6, 6.3.2, 6.4.0
    • None
    • Windows

    Description

      QT 6 doesn't correctly follow the Windows 10 display scaling. Menu fonts appear to scale correctly but widget fonts do not.

      Screenshots and a sample project are attached. The screenshots were taken with the sample project compiled with QT 6.4.0 from the commercial maintenance app, and the sample project recompiled and rerun AFTER each time the windows scaling was changed.

      Poor display scaling on Windows has been a longstanding problem. With QT5, I had managed to get something to work using a combination of SetProcessDPIAware(); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); and manual scaling of button sizes using QScreen::logicalDotsPerInchX() and QScreen::devicePixelRatio(). However QT6 doesn't respond in any logical way to any of these settings, hence this bug report.

      I'm a QT licensee who needs this scaling to work, however since I'm on a "Startup" license, I don't have access to direct QT support.

      (I originally raised this under GUI:High-DPI but no one has looked at it, so here I'm raising this under Widgets and Dialogs.)

      Attachments

        1. HighDPITesting.zip
          2 kB
          Michael Smithers
        2. QT4_HighDPI_100pc.PNG
          8 kB
          Michael Smithers
        3. QT4_HighDPI_200pc.PNG
          13 kB
          Michael Smithers
        4. QT4_HighDPI_150pc.PNG
          11 kB
          Michael Smithers
        5. scale100.png
          9 kB
          Eskil Abrahamsen Blomfeldt
        6. scale150.png
          16 kB
          Eskil Abrahamsen Blomfeldt
        7. scale200.png
          24 kB
          Eskil Abrahamsen Blomfeldt
        8. QtC_100pc.PNG
          63 kB
          Michael Smithers
        9. QtC_150pc.PNG
          63 kB
          Michael Smithers
        10. QtC_200pc.PNG
          71 kB
          Michael Smithers
        11. QtMaintenance150pc.PNG
          493 kB
          Michael Smithers
        12. Qt641_650_150pc.PNG
          17 kB
          Michael Smithers
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            mjsmithers Michael Smithers
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes