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

List:       kde-devel
Subject:    Re: Using the contextMenu of KSystemTray
From:       Christian Nitschkowski <segfault_ii () web ! de>
Date:       2002-04-29 17:47:17
[Download RAW message or body]

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

Am Montag, 29. April 2002 19:38 schrieb Malte Starostik:
> 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.

Thanks.
It worked.

- -- 
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
GnuPG / PGP Key ID: 52FF1D09
search on wwwkeys.de.pgp.net or search.keyserver.net
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8zYcub/QSzFL/HQkRAq15AJ9vGjeVZAjqLD4nWN49tdEJynER5QCfVPML
M9H72hcCyI2wPrK83O8Rf38=
=kLA5
-----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