[Qt-interest] Qusetion about setIconSize() ?

Jens Bache-Wiig jbache at trolltech.com
Mon Jul 13 14:32:39 CEST 2009


Hi Kermit

QIcon normally only scales icons down and not up. Most likely to avoid 
the blurriness associated with upscaling images. If you need bigger 
icons than 48x48, you should add extra sizes to QIcon. Another 
alternative is to use an SVG-icon instead.

Jens

> Hello community!
> 
> If my picture's size is 48X48, and I use it as a QPushButton's icon. Can
> I set the icon's size as 56x56? I did it, but there's no effect.
> 
> When I set the picture's size as 56x56 using GIMP, then I can see the
> big icon after setting it with "btn->setIconSize(QSize(56,56));"
> 
> Why? Does Qt can't use small picture as a icon if you want to show it
> more than the picture itself?
> 
> Thanks.
> Kermit


-- 
Jens Bache-Wiig - jbache at trolltech.com
Nokia - Qt Software



More information about the Qt-interest-old mailing list