[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KAction, KToggleAction and KRadioAction
From:       Stephen Allewell <stephen () mirramar ! fsnet ! co ! uk>
Date:       2002-02-08 21:32:39
[Download RAW message or body]

Roland Krause wrote:
> 
> I am trying to use KToggleAction and KRadioAction in the menu of an
> application.
> 
> How do I group KRadioActions so that they get "radioed" against each
> other. Can this be done via the XML gui.rc file?
> If so, is this documented somewhere?

You need to assign them to an exclusive group

eg. 

KRadioAction *foo = new KRadioAction(....);
foo->setExclusiveGroup("groupname");

do this for each action in the group 'groupname'

> 
> Is there a way to set KToggleAction and KRadioActions checked by
> default? Can this be done via the XML gui.rc.file?

use   foo->setChecked(true);

> 
> Can I set a KAction to be disabled upon startup, again via XML gui.rc
> file? I know how to do it in code.
> 

not sure about doing this with the XML gui

> Can KActions have multiple parents, i.e. can I put a KAction in more
> than one KActionCollection?
> 

not sure about this either

> Tnx for your advice, I appreciate pointers to the documentation.
> 
> Roland

regards

Steve
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic