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

List:       kde-devel
Subject:    Re: Using the contextMenu of KSystemTray
From:       Malte Starostik <malte () kde ! org>
Date:       2002-04-29 17:38:40
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Monday 29 April 2002 19:29 schrieb Christian Nitschkowski:
> Hi there!
>
> I wanted to add a KAction to the contextMenu of a class derived from
> KSystemTray.
>
> The code is
>
> KAction* preferences = KStdAction::preferences (0, 0, &actionCollection);
> preferences->plug(contextMenu());
>
> The compiler returns
> oooqs.cpp:33: no matching function for call to `KAction::plug (KPopupMenu
> *)' /opt/kde3/include/kaction.h:314: candidates are: int
> KAction::plug(QWidget *, int = -1)
>
> Why can't I plug the KAction into the menu?
> I looked at some other code and the example in the kdelibs-documentation
> where it is described this way.
You can, only the compiler doesn't know KPopupMenu is a QWidget. It's only 
forward declared. Add #include <kpopupmenu.h> and it should work.

- -- 
Malte Starostik
PGP: 1024D/D2F3C787 [C138 2121 FAF3 410A 1C2A  27CD 5431 7745 D2F3 C787]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8zYUiVDF3RdLzx4cRArp7AKCYo4ay8SV0vmYLXe+8TSncZdCGbwCfapDC
2NPhvF96yO6+v7bqjbuRtiA=
=Lx/u
-----END PGP SIGNATURE-----

 
>> 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