Best Practices for Qt Creator icons
-
I'm currently working on a GUI at a desktop screen in 1920 x 1080, however, the png icons I have right now are of different scales ( 96 x 96, 500 x 500 e.t.c.) but they are resized as 25 x 25 buttons in the interface.
The icons are displayed normally, but I noticed because of these different scales, certain icons especially those at 500 x 500 are pixelated when resized.
I am thinking if there are any best practices out there where I can use a single scale (a one size fits all) with png icons and display them with sharpness especially for HDpi monitors.
-
I'm currently working on a GUI at a desktop screen in 1920 x 1080, however, the png icons I have right now are of different scales ( 96 x 96, 500 x 500 e.t.c.) but they are resized as 25 x 25 buttons in the interface.
The icons are displayed normally, but I noticed because of these different scales, certain icons especially those at 500 x 500 are pixelated when resized.
I am thinking if there are any best practices out there where I can use a single scale (a one size fits all) with png icons and display them with sharpness especially for HDpi monitors.
@avalanste You could use SVG, or you create several sets of your icons with different sizes.
-
@avalanste You could use SVG, or you create several sets of your icons with different sizes.
-
@jsulm Thanks so much!
Is there a different set of code in C++ or python for using SVG files?
Will SVG affect the memory of the product? (ie. causing it to lag or run slower than using png)@avalanste said in Best Practices for Qt Creator icons:
Is there a different set of code in C++ or python for using SVG files?
No, just use *.svg instead of *.png.
I don't know whether SVG consumes considerably more memory, something you would need to check.