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 detect a HiDPI display?
Forum Updated to NodeBB v4.3 + New Features

How to detect a HiDPI display?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 324 Views 2 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.
  • V Offline
    V Offline
    Vadi2
    wrote on last edited by
    #1

    I'm not clear on how to detect if a display is HiDPI with Qt. I've tried QApplication.desktop()->screen()->devicePixelRatio() but even that returns 1 for a display that is 3840x2160.

    Has anyone got hints on how to do this successfully?

    beeckscheB 1 Reply Last reply
    0
    • V Vadi2

      I'm not clear on how to detect if a display is HiDPI with Qt. I've tried QApplication.desktop()->screen()->devicePixelRatio() but even that returns 1 for a display that is 3840x2160.

      Has anyone got hints on how to do this successfully?

      beeckscheB Offline
      beeckscheB Offline
      beecksche
      wrote on last edited by
      #2

      @Vadi2
      I have no experience with HiDPI, but maybe you find some information here.

      Maybe these functions helps: https://doc.qt.io/qt-5/qpaintdevice.html#physicalDpiX and https://doc.qt.io/qt-5/qpaintdevice.html#physicalDpiY

      1 Reply Last reply
      1

      • Login

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