Qt-interest Archive, April 2007
menubar and toolbar
Message 1 in thread
hi,everyone
i am making an gui for a CNC system by using Qt(version 4.2) Designer. now
several problems puzzle me.
first i create many QActions in the Actione Editor and drag them to the
entry of QMenuBar and QToolBar separately. but they don't work as i have
expected. primitively i want to make a group submenus in the menubar or a
group of toolbuttons in the toolbar act as radiobuttons. what's the problem
you think? give me some suggestions please. thank you in advance.
regards
fengli zhang
Message 2 in thread
Try QActionGroup. :)
- Thomas
ååä schrieb:
> hi,everyone
> i am making an gui for a CNC system by using Qt(version 4.2) Designer.
> now several problems puzzle me.
> first i create many QActions in the Actione Editor and drag them to the
> entry of QMenuBar and QToolBar separately. but they don't work as i
> have expected. primitively i want to make a group submenus in the
> menubar or a group of toolbuttons in the toolbar act as radiobuttons.
> what's the problem you think? give me some suggestions please. thank you
> in advance.
> regards
> fengli zhang
>
--
[ signature omitted ]
Message 3 in thread
IIRC there is no such option in qt designer. You will have to create a
QActionGroup in your subclass. That's no problem though, as all you do
is something like:
QActionGroup *myActionGroup = new QActionGroup(this);
// These actions were created via qt designer
myActionGroup->addAction(action1FromUi);
myActionGroup->addAction(action2FromUi);
Also, be sure to set the "checkable" property of an action to true.
Regards,
Thomas
ååä schrieb:
> hi
> how to do that in qt designer?
> fengli zhang
>
> 2007/4/6, Thomas DÃhling <t.daehling@xxxxxxxxxxxxxx
> <mailto:t.daehling@xxxxxxxxxxxxxx>>:
>
> Try QActionGroup. :)
>
> - Thomas
>
> ååä schrieb:
> > hi,everyone
> > i am making an gui for a CNC system by using Qt(version 4.2)
> Designer.
> > now several problems puzzle me.
> > first i create many QActions in the Actione Editor and drag them
> to the
> > entry of QMenuBar and QToolBar separately. but they don't work
> as i
> > have expected. primitively i want to make a group submenus in the
> > menubar or a group of toolbuttons in the toolbar act as
> radiobuttons.
> > what's the problem you think? give me some suggestions please.
> thank you
> > in advance.
> > regards
> > fengli zhang
> >
>
>
--
[ signature omitted ]