[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] removing a menu from the menubar
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2007-12-28 18:31:16
Message-ID: 20071228183116.GB7305 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

On 28.12.07 18:14:25, Ziegler Stefan wrote:
> I began to write some python plugins for QGIS. During the initialisation
> of the plugin I add a menu with:
>  
> self.fileMenu =
> self.iface.getMainWindow().menuBar().addMenu("&DM01-Verifikation")
> self.fileMenu.addAction(self.action1)
> self.fileMenu.addAction(self.action2)
>  
> But how do I unload/remove it from the menubar? I tried:
>  
> self.fileMenu.close()

self.fileMenu = None

Then the garbage collector should delete it. Or maybe you'll need a del
self.fileMenu before that

Andreas

-- 
Everything that you know is wrong, but you can be straightened out.
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic