View Single Post
Old 07-15-2014, 10:24 PM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,735
Karma: 206739468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by kovidgoyal View Post
To fully update the GUI after adding new books you would need to do

db.data.books_added(book_ids)
self.gui.library_view.model().books_added(num)
self.gui.db_images.beginResetModel(), self.gui.db_images.endResetModel()
self.gui.tags_view.recount()

This updates all the various components of the GUI.
self.gui.db_images.beginResetModel(), self.gui.db_images.endResetModel() seems to be working for me in the PyQt5 beta versions of calibre, but not in the current (PyQt4) versions.

Getting the following error:
Code:
AttributeError: 'DatabaseImages' object has no attribute 'beginResetModel'
DiapDealer is offline   Reply With Quote