Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-33426

Default Dpi Scale Factor breaks UI in Windows

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 17.0.0
    • Editors
    • None
    • Windows

      For years Qt Creator and QDS UIs are broken for me when using displays with different scales/resolutions. Menus and sub-menus on wrong position, text that doesn't fit, buttons with incorrect size and so on...

      While investigating the issue to try to create a reproducer, I came across this code: 

      Qt::HighDpiScaleFactorRoundingPolicy StyleHelper::defaultHighDpiScaleFactorRoundingPolicy()
      {
          return HostOsInfo::isMacHost() ? Qt::HighDpiScaleFactorRoundingPolicy::Unset
                                         : Qt::HighDpiScaleFactorRoundingPolicy::Round;
      }
       

      Setting  Qt::HighDpiScaleFactorRoundingPolicy::Round in a simple Qt application gives the same problem I was seeing in Qt Creator and Design Studio.

      Unfortunately, this is the default setting in QtCreator, and is not easing to find, but it is available in the configuration options.

      My proposal is to have  Qt::HighDpiScaleFactorRoundingPolicy::Unset as default on QtCreator. Or make it easier to quick find this settings and improve documentation around it.

        1. image-2025-08-28-12-23-45-658.png
          708 kB
          Maycon Stamboroski
        2. image-2025-08-28-13-16-16-052.png
          65 kB
          Maycon Stamboroski
        3. image-2025-08-28-13-17-21-135.png
          40 kB
          Maycon Stamboroski
        For Gerrit Dashboard: QTCREATORBUG-33426
        # Subject Branch Project Status CR V

            portale Alessandro Portale
            mastambo Maycon Stamboroski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change