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. Can Widget Applications on the Mac and Windows Be DPI-Aware?
Forum Updated to NodeBB v4.3 + New Features

Can Widget Applications on the Mac and Windows Be DPI-Aware?

Scheduled Pinned Locked Moved General and Desktop
dpiwidget applicatwindowsmac os x
3 Posts 3 Posters 1.6k 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.
  • M Offline
    M Offline
    maximo
    wrote on last edited by
    #1

    On super high resolution monitors, is there a way to make widget applications DPI-aware? Or, is it a bad practice to make an app with drag/drop widgets if you want them to be DPI-aware?

    (Background: I created a widget application and am a noob to Qt/C++, and have been teaching myself C++.)

    ravasR 1 Reply Last reply
    0
    • L Offline
      L Offline
      linuxkid
      wrote on last edited by
      #2

      Hello! And welcome to the forums!
      As far as I see, you can act depending on the DPI, yes.
      QPaintDevice gives you information pertinent with QPaintDevice::logicalDpiX() QPaintDevice::logicalDpiY() QPaintDevice::widthMM() and QPaintDevice::heightMM()
      You can also you can use QApplication and have a call to desktop()->logicalDpiX() for example..

      Hope I managed to express myself correctly.
      Regards!

      1 Reply Last reply
      0
      • M maximo

        On super high resolution monitors, is there a way to make widget applications DPI-aware? Or, is it a bad practice to make an app with drag/drop widgets if you want them to be DPI-aware?

        (Background: I created a widget application and am a noob to Qt/C++, and have been teaching myself C++.)

        ravasR Offline
        ravasR Offline
        ravas
        wrote on last edited by
        #3

        @maximo
        http://doc.qt.io/qt-5/highdpi.html
        http://doc.qt.io/qt-5/qscreen.html#devicePixelRatio-prop

        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