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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -