Adding a new menu

O Manual de Programação do KDevelop: O Guia do Utilizador para Desenvolvimento de Aplicações C++ para o Ambiente de Trabalho K (KDE) com o ambiente de trabalho KDevelop, Versão 2.1
Prev | Capítulo 5. Configuring Menubars and Toolbars | Next

# 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

Prev | Home | Next
Configuring Menubars and Toolbars | Up | Integrating Toolbar buttons