"Sharp" scaling for high DPI?
-
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...)?