Das KDevelop-Programmierhandbuch: Leitfaden zur C++-Anwendungsentwicklung für das K Desktop Environment (KDE) mit Hilfe der KDevelop-IDE in der Version 1.2 | ||
---|---|---|
Zurück | Kapitel 5. Configuring Menubars and Toolbars | Vor |
A new menubar is added to an application by the following:
add a pointer to the new menu in the App-class header
call the constructor of QPopupMenu to the pointer in initMenuBar() at the location where your menubar should appear later.
insert the according menu-items into the popup menu and set their resource ID's in the resource file
add connects for commandCallback() and statusCallback() to the menu at the end of initMenuBar()
add the methods you want to call by the menu-entries in the header and implementation file.
add the switch statements for the entries to the commandCallback() and statusCallback() methods