Friday June 25, 2004
KAction, KPushButton, KNope!
- Posted by Rob (#1) on June 25, 2004 16:12 CEST
This is how KDE should work:
KPushButton *button = new KPushButton( this );
KAction *action = actionCollection()->action( "myaction" );
action->plug( button );
Alas, it doesn't. Although KAction::guiItem() ( 3.3) looks promising, it seems like there isn't any way to easily hook an action to a button. Neil told me to add some manual connects, but I'm reluctant: I'm using KAction precisely to avoid having to track setEnabled calls. It wouldn't be hard to connect a few signals and slots, but obviously that's a step a developer shouldn't have to take.
- PermaLink: KAction, KPushButton, KNope!
- Tags: KDE, Kaction, KPushButton
- Post comment