Reputation: 349
I have this subroutine:
def checkout_button_handler(self):
self.processing_label.show()
self.qry_db()
self.processing_label.hide()
return
when I call it, processing_label
never shows, and it starts querying the db.
How can I force showing this label before it moves to the next line ?
Upvotes: 1
Views: 57
Reputation: 120778
Processing pending events before querying the db might help:
self.processing_label.show()
QtGui.qApp.processEvents() # or QtCore.QCoreApplication.processEvents()
self.qry_db()
Upvotes: 1