PDA

View Full Version : Question regarding scalable svg files as icons



gdiepen
4th March 2008, 21:21
Hi,

I am using PyQt4, but I don't think it is a python problem. For an application I am working on, I need one icon in a normal size, but also in a larger size (for an animation).

I have this image in an SVG file which I thought to be scalable in client programs.

For some reason, when I put the QIcon created with the SVG file on a toolbutton, it stays really small. Even when I modify the SVG file to be 425x425 pixels (really large) and load it as a QIcon, it looks really small on the toolbutton.

Is there a way I can just resize the SVG file that is in a QIcon?

wysota
4th March 2008, 23:00
Did you change the iconSize property of the button?

gdiepen
5th March 2008, 08:56
Did you change the iconSize property of the button?

Sweet, that is solving my problem :)

I have looked on the internet, but I did not find this answer anywhere... If only all of my problems were solvable this easy :)

wysota
5th March 2008, 09:37
You should have looked in the documentation :]

gdiepen
5th March 2008, 09:59
You should have looked in the documentation :]

I did that also, as good as I could. The problem is that if you don't know that you have to look for setIconSize, it is rather difficult to find ;)