[Qt-interest] changing commom properties on the fly (noob)

Francisco Ares frares at gmail.com
Thu Feb 11 12:04:15 CET 2010


On Wed, Feb 10, 2010 at 11:09 AM, william.crocker at analog.com <
william.crocker at analog.com> wrote:

>
> > I would like to change, say, the icon size of all buttons ant toolbars
> > at the same time without worriing to know how many and which are the
> > elements that needs to change.
> > As far as I could see, this is a stylesheet task, but did not find a
> > clue on how to do that.
>
>
> I do this.
> I wish I could change the size of icons on menus
> but does not appear possible with 4.5.3
>
> 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 );
>     }
> }
>
>
> > Thanks a lot
> > Francisco
> >
> > --
>


That was not what I had in mind, but it works!!

Thank you
Francisco
-- 
"If you have an apple and I have an apple and we exchange apples then you
and I will still each have one apple. But if you have an idea and I have one
idea and we exchange these ideas, then each of us will have two ideas." -
George Bernard Shaw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100211/6b5d9891/attachment.html 


More information about the Qt-interest-old mailing list