From kde-devel Mon Apr 29 17:47:17 2002 From: Christian Nitschkowski Date: Mon, 29 Apr 2002 17:47:17 +0000 To: kde-devel Subject: Re: Using the contextMenu of KSystemTray X-MARC-Message: https://marc.info/?l=kde-devel&m=102010249413957 -----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 =3D KStdAction::preferences (0, 0, &actionCollec= tion); > > preferences->plug(contextMenu()); > > > > The compiler returns > > oooqs.cpp:33: no matching function for call to `KAction::plug (KPopup= Menu > > *)' /opt/kde3/include/kaction.h:314: candidates are: int > > KAction::plug(QWidget *, int =3D -1) > > > > Why can't I plug the KAction into the menu? > > I looked at some other code and the example in the kdelibs-documentat= ion > > where it is described this way. > > You can, only the compiler doesn't know KPopupMenu is a QWidget. It's o= nly > forward declared. Add #include and it should work. Thanks. It worked. - --=20 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# 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=3D =3DkLA5 -----END PGP SIGNATURE----- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<