View Single Post
Old 11-26-2013, 05:17 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,590
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
library_change is the only callback for changing libraries.

IIRC the on device column is populated in the GUI thread on library change, there for you should just be able to do this:

Code:
def library_changed(self):
   QTimer.singleShot(0, self.do_work)

def do_work(self):
   # the on device column should be populated here.
kovidgoyal is offline   Reply With Quote