Quote:
Originally Posted by kovidgoyal
Set the menu as the parent. And keep a python reference to the widget action to prevent it from being garbage collected.
|
thanx. works!
had to add QMenu(self.gui) to qaction and keep a python reference to the widget action...
Code:
d = MyPlugin(self.gui, self.qaction.icon(), do_user_config, self.qaction)
m = QMenu(self.gui)
self.qaction.setMenu(m)
a = QWidgetAction(m)
a.setDefaultWidget(d)
m.addAction(a)