View Single Post
Old 04-02-2011, 03:58 AM   #20
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
In my ConfigWidget class I need to call another routine outside the class to initialize data - the routine is used when you run actions other than configuration as well. That routine needs the Calibre gui object in order to get information from Calibre. How do I refer to that gui object? e.g.

Code:
def ConfigWidget(QWidget):
...
       my_initialize_routine()


def my_initialize_routine():
    model = self.gui.library_view.model()
self.gui does not exist. I used to have the routine as part of the base object and could call it as self.plugin_action.my_initialize_routine().

Help

I know, I should just wait for kiwidude to release his updated plugins and then copy him
meme is offline   Reply With Quote