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

List:       kde-devel
Subject:    Re: KAboutData + help menu: HOWTO?
From:       coolo () kde ! org
Date:       2000-02-27 15:45:58
[Download RAW message or body]

Johannes Sixt wrote:
> 
> Hi!
> 
> I've managed to set up KAboutData (for KDbg). But what do I have to do that this
> stuff is also displayed when I choose "About kdbg..." from the help menu?
> 
> Here's what I currently do in main():
> 
>     KAboutData aboutData("kdbg",...etcetc...);
>     aboutData.addAuthor(...);
>     aboutData.addCredit(...);
>     KCmdLineArgs::init( argc, argv, &aboutData );
>     KApplication app;
>     DebuggerMainWnd debugger("kdbg_main"); // derived from KTMainWindow
> 
>     // add help menu
>     // ---------- What to do in the next line?
>     QPopupMenu* helpMenu = debugger.helpMenu();
>     debugger.menuBar()->insertItem(i18n("&Help"), helpMenu);
> 
> When I run this piece of code, I see the message
> "Instance kdbg has no about data". Before I started to use KAboutData, this
> message appeared twice.
> 
> Is there an application in CVS that does it The Right Way?
> 
That's weired. This debug message is only in the constructor of
KInstance
called by KApplication(argc,...), otherwise it wouldn't know about the
name
kdbg at all - to create the debug message. So I would say, the way you
do it
is the only and right way. In the code (of kdecore) I can't find another
way to create a KInstance indirectly.

Beside that I think, KHelpMenu is the trick.

Greetings, Stephan

-- 
It said Windows 95 or better, so in theory Linux should run it
                                                GeorgeH on /.

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

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