Well.. I wound up doing just
that.. Splitting it into to.. allowing the dialog to close each time…
However, I still think is a bug
that a hidden dialog cant be shown again
[mailto:qt-interest-bounces@xxxxxxxxxxxxx] On Behalf Of Andre Somers
Sent: Wednesday, June 30, 2010 1:30 AM
Subject: Re: [Qt-interest] Hiding a QDialog?
On 30-6-2010 0:06, Scott Aron Bloom wrote:
I have a startup/login dialog, that after the user hits OK,
I would like to hide(), showing messages onto the QSplashScreen.
If however, there is a problem logging in, a message box
pops up, then I show() dialog and would like to continue.
Here is the rub, when you hide a dialog, it sets the exit
flag in the QDialog’s event loop. So the next time the dialogs event loop
cycles, it exits out.
Is there anyway, to restart the event loop?
problem. I had no idea that calling hide() on a QDialog would trigger the exit
of its eventloop...
Wouldn't it make sense to separate your logic a bit? You could have your dialog
just be the UI for entering the credentials. Another class could be responsible
for checking them. That way, you can have that credentials class pop up the
dialog for entering the credentials as often as you need. You can have all
logic having to do with the status of the login in that single credentials
class, including stuff like caching, timeout, etc.
Nokia Certified Qt Developer.
Interested in Qt related job offers or freelance Qt consulting work.