How do I modify the default application interface?

Caleb Tennis caleb at aei-tech.com
Tue Oct 29 18:17:44 GMT 2002


> It appears that I do NOT have a KDE app.  I have not modified the
> generated code yet.  My main application class, SonarApp, inherits from
> QMainWindow.  The SonarApp constructor calls a number of init* methods.
>  Among them is initMenuBar() and initToolBar().
>
> Looking in the initMenuBar method, there is a line that says "EDIT YOUR
> APPLICATION SPECIFIC MENUENTRIES HERE."  So I would assume this is where
> I would make my application-specific additions to the main menu bar.
>
> However, what if I want to remove or change the existing menu entries?
>  It seems silly to "undo" the effects of previous code.  For example,
> the SonarApp class has as members the widgets that make up the edit
> menu.  The initMenuBar method adds the edit menu to the menu bar.  Am I
> supposed to then remove the menu bar 10 lines of code later??
>
> Can't I interactively customize the main menu via KDevelop?  There must
> be a way to toggle the inclusion of menus and change menu and button
> properties.

That depends on what you mean by "interactively customize". :)
When you created the "generic" template of this project with KDevelop, it
just
copied this generic source code from an archive into this project directory.
From
there, you can use the text editor to customize all of the source, including
the menubar
stuff.  That's the way I code; I lay everything out by writing the code
directly.

If you want to be able to do it like Qt Designer, then you'll have to use Qt
Designer.  What
you can do, however, is create this "menu" in Qt Designer and save it as a
.ui file.  Then, in
KDevelop, if you add the .ui file to your project, it will take care of the
compilation issues for you.
That sounds to me like more what you want to do.

> I haven't used Qt Designer for this project yet.  So I assume all of the
> Qt code was generated by KDevelop.  If I modify the application
> interface via Q Designer, how will the KDevelop code generator pick up
> those changes?

Again, it was generated by KDevelop, but the generation was no more than
just copying
some template source files.


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list