I have a set of qactions defined as checkable and belonging to a group:
KAction* a;
group1->setExclusive(true);
a = new KAction(KIcon("edit-select"),i18n("Select mode"),this);
a->setCheckable(true);group1->addAction(a);
a->setChecked(true); //default action
actionCollection()->addAction("mouse_pointer", a);
connect(a,SIGNAL(triggered(bool)),this,SLOT(setModeNone()));
KAction* a;
QActionGroup* group1=new QActionGroup(this);
group1->setExclusive(true);
a = new KAction(KIcon("edit-select"),i18n("Select mode"),this);
a->setCheckable(true);group1->addAction(a);
a->setChecked(true); //default action
actionCollection()->addAction("mouse_pointer", a);
connect(a,SIGNAL(triggered(bool)),this,SLOT(setModeNone()));
To copy to clipboard, switch view to plain text mode
I need them checkable so they can remain "pushed" in my mode toolbar, to show the user the current mode of operation.
I need them exclusive, because only one mode of operation is active.
This works fine , except that I don't like the use of these QActions to my menus.
I added them to a menu and they shown up with radio buttons in front of them:
plasma-desktoprDi436.png
But I want to show only the text/icon/keys and not any radiobuttons,checkboxes.
Is there a way to force hide the buttons ONLY in the menu?
Thank you in advance
Bookmarks