PDA

View Full Version : How to change the size of icon on qmainwindow?



newcfd
20th October 2015, 00:51
the icon size is too small. How to make it bigger. It should be easy.
After I tried a few things, nothing works.
Why not to make this change straightforward in Qt?

newcfd
20th October 2015, 02:51
1. setIconSize(). Not working
2. resize png image does not work
3. subclass QWindowsStyle with reimplementation of pixelMetric(). this function is called. But the change does not work.
4. QStylesheet has not icon-size setting for qmainwindow

anda_skoa
24th October 2015, 16:10
Since it is not clear what you mean with "icon on qmainwindow", I guess you mean the icon displayed in the window decoration.

That depends a lot on the platform.
A platform where the window decoration is provided by the windowing system is doing what the windowing system wants to do.
On a platform where that is not the case, the Qt platform adapter should be using the size that this commonly used on that platform.

In either case it is not something that the application controls.

Cheers,
_