[PyKDE] submenus in PyKDE

Jim Bublitz jbublitz at nwinternet.com
Sat Jan 4 18:04:01 GMT 2003


On 04-Jan-03 Gordon Tyler wrote:
> On January 4, 2003 01:51 pm, Jérôme Martin wrote:
>> Is some one have an example to create a submenu with PyKDE.
>> My menu are currently created with KAction/KStdAction.
 
> fileMenu = QPopupMenu(self)
> someAction.addTo(fileMenu)
> submenu = QPopupMenu(self)
> anotherAction.addTo(submenu)
> fileMenu.insertItem("Submenu", submenu)

You can also look at the KDE docs for KAction and KActionMenu. The
latter lets you build a submenu of KActions. Also see KSelectAction.

The KDE 3.0 Class Reference is available at:

<http://developer.kde.org/documentation/library/3.0-api/classref/ind
ex.html>

Jim




More information about the PyQt mailing list