C++ (Qt)void setAutoRaiseButton( QToolBar *toolbar, QAction *action, bool value ){ if( !toolbar || !action ) return; QToolButton *btn = qobject_cast<QToolButton*>( toolBar->widgetForAction( action ) ); if( btn ) btn->setAutoRaise( value );}
C++ (Qt)void setAutoRaiseToolBar( QToolBar *toolbar, bool value ){ QObjectList childs = toolbar->children(); QListIterator<QObject*> i( childs ); while( i.hasNext() ) { QToolButton *btn = qobject_cast<QToolButton*>( i.next() ); if( btn ) btn->setAutoRaise( value ); }}