How to solve the png files on different screen pixs?
-
when i run the program with the label icon on the high dpi screen computer.the background image of the png files looks like not smoothly.how to solve the outlook of the bg images on different level of the screen dpis?
-
when i run the program with the label icon on the high dpi screen computer.the background image of the png files looks like not smoothly.how to solve the outlook of the bg images on different level of the screen dpis?
Try an SVG icon.
-
Try an SVG icon.
@Pl45m4 Since it only takes a QPixmap the (currently) only way is to provide a pixmap with the same resolution but a higher devicePixelRatio. E.g. scale the svg to 2x the desired size, convert it to a pixmap, set the pixmaps device pixel ratio to 2.
Maybe I can get this patch in soon: https://codereview.qt-project.org/c/qt/qtbase/+/569056
-
Try an SVG icon.
@Pl45m4
Ive tried the svg file.the icon could be normal on diffrent dpi platforms.but another problem came out,that I just dont know the way to make the other svg image when pressing or hovered the pushbutton.