Das K Desktop Environment

5.2. Adding a new menu

A new menubar is added to an application by the following:

  1. add a pointer to the new menu in the App-class header

  2. call the constructor of QPopupMenu to the pointer in initMenuBar() at the location where your menubar should appear later.

  3. insert the according menu-items into the popup menu and set their resource ID's in the resource file

  4. add connects for commandCallback() and statusCallback() to the menu at the end of initMenuBar()

  5. add the methods you want to call by the menu-entries in the header and implementation file.

  6. add the switch statements for the entries to the commandCallback() and statusCallback() methods