PDA

View Full Version : Add exclusive buttons in a toolbar with qtdesigner



xbee
19th November 2006, 12:13
I was able with qt3 to add exclusive buttons in a toolbar with designer by using QActionGroup, but I can't find how do this with qt4, did I Miss Something?

Thanks

jacek
19th November 2006, 14:45
I'm afraid you will have to do it in the code.

xbee
19th November 2006, 15:25
It's not a good news :(
Thanks

jacek
19th November 2006, 15:38
Oh, come on, it's not that bad:

QActionGroup * group = new QActionGroup( this );
group->addAction( ui.action1 );
group->addAction( ui.action2 );
group->addAction( ui.action3 );
...
_ui.action1->setChecked( true );
But I guess that the Trolls could improve Action Editor to include action grouping.

xbee
19th November 2006, 21:24
Oh, yes I can do it directly in the code, but I think it's cleaner to do it in the designer. Waiting for the trolls ... :)

Thanks