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

List:       kde-devel
Subject:    Beginners Problem: Problem with KPopupMenu*  helpMenu method
From:       Oliver D <oliverd17 () gmx ! de>
Date:       2003-08-31 11:29:26
[Download RAW message or body]

Hello,

i'm just learning programming KDE. So i bought a book, read some 
tutorials, but i can't find an answer to my problem. It's simply about 
adding a help menu. So i'll use this piece of code in my programm.

  KMainWindow *top = new KMainWindow ();            // Main Window
  KPopupMenu *help = top->helpMenu (aboutText);     // helpMenu is a 
method of the class KMainWindow

  top->menuBar()->insertItem( i18n("&Help"), help); // insert helpMenu 
in my top window

However, this gives me a compiler message that i don't understand
    error: no matching function for call to `KMenuBar.:
As far as i understood, the compiler wants me to connect a function to 
the helpMenu i've just inserted, but in the documentation of the class 
stands that this piece of code wil display the standard help menu. So my 
next thought was that i forgot to include the header file that links the 
necessary librarie for the implementation, but i'm using...

 #include <kaction.h>
 #include <kapplication.h>
 #include <kcmdlineargs.h>
 #include <klocale.h>
 #include <kmainwindow.h>
 #include <khelpmenu.h>
 #include <kmenubar.h>
 #include <kstdaction.h>
 #include <qlabel.h>
 #include <qpopupmenu.h>

and khelpmenu.h should give me the necessary link, or?

Any help would be great, i'm searching now for four days and could'nt 
find anything solving my problem.

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