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 apply QT_DEVICE_PIXEL_RATIO to all GUI elements?
QtWS25 Last Chance

How to apply QT_DEVICE_PIXEL_RATIO to all GUI elements?

Scheduled Pinned Locked Moved General and Desktop
high dpiwindows
1 Posts 1 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.
  • T Offline
    T Offline
    thebeast444
    wrote on last edited by thebeast444
    #1

    Hi all,

    Unlike Mac OS X, where device pixel ratio is automatically adjusted for Retina display, Windows environment doesn't seem to give any hint to use dpr 2.0 for high dpi + relatively small sized screens.

    I understand QT_DEVICE_PIXEL_RATIO environment variable became available for windows since Qt 5.4, but setting QT_DEVICE_PIXEL_RATIO to 2 using
    setx QT_DEVICE_PIXEL_RATIO 2
    doesn't seem to affect some parts of GUI elements.

    For example, QMessageBox shows 2x sized window but text and buttons still remained at 1x size. Also context menus also stayed at 1x size.

    Did anyone run into similar problem and found solution to this issue?

    Thanks in advance.

    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