Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to enable hi-dpi support on Windows?
Forum Updated to NodeBB v4.3 + New Features

How to enable hi-dpi support on Windows?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • RobertWR Offline
    RobertWR Offline
    RobertW
    wrote on last edited by
    #1

    My app (built with Qt 5.7.1) looks perfect on a Retina MacBookPro. But it looks terrible on a hi-dpi Windows laptop. The fonts and icons are so tiny it is borderline unusable. Apparently the app did not detect the hi-dpi settings on Windows? So how do I fix it? Is it possible? I already turn on Qt::AA_EnableHighDpiScaling for application. Is there anything else I need to do to make the app work on hi-dpi screen under Windows?

    Thank you!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I assume u found
      http://doc.qt.io/qt-5/highdpi.html

      "While the macOS style fully supports high-DPI, the Windows desktop style currently has some limitations with certain scale factors. In these cases, consider using the Fusion style instead, which aims to support high-DPI in all cases."

      So you could try fiddling with the QT_SCALE_FACTOR
      and see if change anything.

      1 Reply Last reply
      1
      • RobertWR Offline
        RobertWR Offline
        RobertW
        wrote on last edited by
        #3

        Thanks for your reply. But how am I supposed to know what QT_SCALE_FACTOR to set based on user's system settings? I noticed that 'Fusion' style suggestion , too. But to be honest I think it is kind of silly. I want the app to look native on Windows, not in some other 'style'. I'm just a little baffled that at this stage and age (Qt 5.7.1) Qt still can't handle hi-dpi correctly? Really? :-(

        mrjjM 1 Reply Last reply
        0
        • RobertWR RobertW

          Thanks for your reply. But how am I supposed to know what QT_SCALE_FACTOR to set based on user's system settings? I noticed that 'Fusion' style suggestion , too. But to be honest I think it is kind of silly. I want the app to look native on Windows, not in some other 'style'. I'm just a little baffled that at this stage and age (Qt 5.7.1) Qt still can't handle hi-dpi correctly? Really? :-(

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @RobertW
          Hi
          No no, just wanted you to play around and see if it can look good at all.
          Qt is using the support of the platform and the result will/might vary.

          Can we see a screen shot on window?

          I wish i could tell you a easy fix but as far as i know there is none.

          1 Reply Last reply
          0
          • RobertWR Offline
            RobertWR Offline
            RobertW
            wrote on last edited by RobertW
            #5

            The problem is I don't have a hi-dpi Windows device to test by myself :-( I mainly develop on Mac and everything works well on Mac. I built a Windows version on a low-end PC to let other people use the app on Windows. But quite a few have complained that everything looks too tiny on hi-dpi devices, such as a Surface Pro tablet, or a hi-dpi laptop PC. I don't have a screenshot but I think the problem is clear. My Qt app does not recognize the hi-dpi/scaling settings on Windows. So it renders everything in full/native resolution. That's why the texts and icons look tiny.

            Thanks.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved