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?

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
  • 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 28 Aug 2015, 01:45 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++.)

    R 1 Reply Last reply 28 Aug 2015, 04:59
    0
    • L Offline
      L Offline
      linuxkid
      wrote on 28 Aug 2015, 02:36 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
        28 Aug 2015, 01:45

        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++.)

        R Offline
        R Offline
        ravas
        wrote on 28 Aug 2015, 04:59 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

        2/3

        28 Aug 2015, 02:36

        • Login

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