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

List:       kde-core-devel
Subject:    KAction/KPushButton question
From:       Rob Kaper <cap () capsi ! com>
Date:       2004-06-25 12:30:25
Message-ID: 20040625123025.GN24198 () ashley ! olsen ! capsi ! com
[Download RAW message or body]


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@capsi.com | better learn baseball" -- Jacques Barzun

[Attachment #3 (application/pgp-signature)]

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

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