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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -