python 3.x - PyQt4: Wait on modeless dialog -
is there way of waiting on closure of modeless dialog?
here example application: start program needs startup stuff , needs user log-in. since user logging in takes time, i'd have login box modeless, can continue doing other startup stuff in background. @ point not going able continue until login process completed. ideally i'd able call dialog.wait_until_complete()
when point , have act modal dialog, continuing once user accepts/rejects dialog.
connect dialog's finished signal:
self.login.finished.connect(self.handleloginfinished) ... def handleloginfinished(self, result): if result == qdialog.accepted: # register login... else: # deal cancelled login...
to prevent user interaction, hide()
main window until login completed. otherwise, change dialog's modality, need like:
self.login.hide() self.login.setmodal(true) self.login.show()
Comments
Post a Comment