KAction/KPushButton question

Rob Kaper cap at capsi.com
Fri Jun 25 13:30:25 BST 2004


How do I plug a KAction to a KPushButton so changing the KAction in one
place will automatically update every GUI element using it?

It looks like

	KPushButton *button = new KPushButton( m_actionCollection->action( "myaction" )->guiItem(), this );

might work in KDE 3.3 and up, but I can't test it as I'm not running HEAD.
(so someone please confirm or deny whether this is the preferred way)

The "@since 3.3" seems to imply that for current KDE releases (3.x) there is
no easy way to do this? I can't believe that actually, that there isn't a
trivial way to plug an action on a button.. so what part of the API am I
misreading or missing here?

Rob
-- 
Rob Kaper     | "Whoever wants to know the heart and mind of America had
cap at capsi.com | better learn baseball" -- Jacques Barzun
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040625/ba6ac0f3/attachment.sig>


More information about the kde-core-devel mailing list