[PyKDE] submenus in PyKDE

Gordon Tyler gordon at doxxx.net
Sat Jan 4 21:01:00 GMT 2003


On January 4, 2003 10:15 am, 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)

Sorry, I misread your question. The example I have was for QActions. For 
KActions you need to use the plug method to add a KAction to a KPopupMenu. 

Ciao,
Gordon




More information about the PyQt mailing list