[Qt-interest] QToolButom - Icon problem and resize problem

william.crocker at analog.com william.crocker at analog.com
Thu Jun 17 23:34:07 CEST 2010



Luis Lezcano Airaldi wrote:
> El 17/06/10 15:19, Lucas Pereira Caixeta escribió:
>> Guys, I have a toolbutom with an icon in ... but the icon is small ... 
>> how do I resize it?
>>
>> Ah! and how do I let a person not resize a window?
> Oi.
> 
> You have to set maximumSize and minimunSize to the same values.
>

I do this:

void
MyApp::setAllIconSizes( QSize sz ) {
     foreach( QWidget *wp, qApp->topLevelWidgets() ) {
         foreach( QToolBar *bp, wp->findChildren<QToolBar*>() ) {
             bp->setIconSize( sz );
         }
         foreach( QToolButton *bp, wp->findChildren<QToolButton*>() ) {
             bp->setIconSize( sz );
         }
     }
}


> Regards.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 



More information about the Qt-interest-old mailing list