[PyQt] Modal Dialogs? Basic howto help please.
Chris M
chris.pm at gmail.com
Thu Jun 19 18:28:10 BST 2008
Sorry Lee, hadn't realised I had sent a personal email, so messages
quoted below for the list.
Are you wanting the dialog to stay above other windows in your
application or above all other windows on your desktop?
Regards,
Chris
2008/6/19 Lee Jackson
> Sorry I should have thought how to term this better, Im looking for the
> equivilent of "stay on top" so that the dialog isnt covered by other
> application windows.
2008/6/19 Lee Jackson
> Sorry, will this go to the list?
>
> As I understand it, the code I posted should just create a blank modal
> dialog - I was posting it as a simplistic test case.
>
> The problem I have is that the dialog ISNT modal and I was wondering if
> had failed to understand something in how PyQT handled modal dialogs
> (e.g. do I need a main window?)
>
> This is running on Ubuntu 8.04 and basically Im asking for a sanity
> check :)
>
>Regards
>
>Lee
-----Original Message-----
From: Chris M
> Lee, I'm probably missing your point, but a modal dialog just blocks
> access to the other windows/dialogs in your application until it
> exits. With no other windows I don't follow what you are trying to
> achieve?
2008/6/17 Lee Jackson
> Sorry, this is probably a stupid question but how do I make a dialog
modal
> if I create an application without a main window?
>
> As an example of my problem, the following creates a dialog but it
isn't
> modal.
>
> import sys
>
> from PyQt4.QtGui import *
> from PyQt4.QtCore import *
>
> app = QApplication(sys.argv)
> dlg = QDialog()
> dlg.exec_()
> app.exec_()
>
> Again, sorry to bother the list with such a basic question but I've
been
> struggling with this one for a while now.
>
> TIA
>
> Lee
More information about the PyQt
mailing list