Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. "Sharp" scaling for high DPI?
Forum Updated to NodeBB v4.3 + New Features

"Sharp" scaling for high DPI?

Scheduled Pinned Locked Moved Unsolved Qt for Python
pysidepython
1 Posts 1 Posters 189 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
    mjiggidyj
    wrote on last edited by mjiggidyj
    #1

    PySide 6.8, QtWidgets application.

    I have a totally custom widget that uses paintEvent() to draw itself, but it is not "DPI aware" in the way it calculates things.

    At 1.0 scale, it looks as it should, of course. On "high DPI" devices like a retina display, the widget itself is scaled up, which is fine, but has a soft "upsampled" look. The intended design of this particular widget has a precise "pixel art" look to it, so I actually would prefer "jagged" nearest-neighbor pixelation if anything.

    I don't think I really want to disable high DPI support through Qt::AA_DisableHighDpiScaling or anything, I just want to change the way this particular widget is resampled for high DPI. Is there a way to do this? Or do I need to go through and rewrite the paint logic to be DPI aware (which I could but... ugh...)?

    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