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 |
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