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

List:       kde-devel
Subject:    Re: adding a menu to a KMainApplication
From:       Michael Pyne <michael.pyne () kdemail ! net>
Date:       2007-11-26 21:25:53
Message-ID: 200711261626.00863.michael.pyne () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 26 November 2007, Lorenzo Bettini wrote:
> Will Stephenson wrote:
> > On Monday 26 November 2007, Lorenzo Bettini said:
> > <snip>
> >
> >> but the menus added with menuBar()->insertItem are not shown at all...
> >>
> >> am I doing something wrong?
> >
> > This doesn't answer your question, but you really should use XMLGUI for
> > setting up windows and toolbars like this.  You don't have to bother with
> > the insertItem() tedium, just instantiate your actions and let the
> > createGUI() call do the rest.  The following rather old but still
> > generally good tutorial explains it:
> >
> > http://developer.kde.org/documentation/tutorials/xmlui/preface.html
>
> actually I'm still using KDE 3, and I'd like to avoid using the .rc
> file, since you need to install the application even for testing and I'd
> like to avoid this (am I right about installation?)

If you specify an absolute path to the .rc file in your code then it will work 
even without installing.  But then you must remember to disable that for your 
release versions (i.e. normal relative filenames)

Also the .rc file is versioned, so if you change it and your application 
doesn't reflect that change, either bump the version or, if you're testing 
it, it probably got copied to your ~/.kde/share/apps/<yourappname>.rc.  Just 
remove that file and the new .rc file should be read.

Regards,
 - Michael Pyne

["signature.asc" (application/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