HiDPI and SVG icon resolution
-
You'll need to use the trick with the QPixmap and QPainter in C++ as well. In the background Python and C++ use the exact same functionality, so I wouldn't expect any other behavior without the workaround. (I have experienced this exact problem in C++ multiple times.)
For your
main.pro
you need to add thesvg
module also:... QT = core gui widgets svg ...
This is what I actually meant with my last post.
-
You'll need to use the trick with the QPixmap and QPainter in C++ as well. In the background Python and C++ use the exact same functionality, so I wouldn't expect any other behavior without the workaround. (I have experienced this exact problem in C++ multiple times.)
I get exactly the same result as in Python (the icon is just a random pixel pattern).
Yes, I know what you meant, I tried adding
svg
but it didn't make any difference. Same for the workaround. So in conclusion, this seems to be a Qt bug on macOS which also affects PyQt5.