View Single Post
Old 12-03-2016, 08:26 PM   #3
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@DiapDealer,

I'm probably not the best person to answer this but on the off chance it helps ...

The first thing that struck me was that the InterfaceAction genesis method in my plugins (originally copied from other plugins) all have QMenu with self.gui as an argument. In addition 'self.menu.aboutToShow' doesn't appear anywhere in my plugins so I'm not sure about that.

Code:
def genesis(self):
    self.menu = QMenu(self.gui)
    self.icons = get_icons([...])
    self.rebuild_menu()
    self.qaction.setMenu(self.menu)
    self.qaction.setIcon(self.icons['images/plugin_icon.png'])
    self.qaction.triggered.connect(self.show_dialog)

def rebuild_menu(self):
    m = self.menu
    m.clear()
    ac1 = self.create_action(spec=(...), attr='...')
    ac1.setIcon(self.icons['images/plugin_icon.png'])
    ac1.triggered.connect(self.show_dialog)
    m.addAction(ac1)
    m.addSeparator()
    ac2 = self.create_action(spec=(...), attr='...')
    ac2.triggered.connect(...)
    m.addAction(ac2)
jackie_w is offline   Reply With Quote