[Qt-interest] Hiding a QDialog?
Andre Somers
andre at familiesomers.nl
Wed Jun 30 10:30:00 CEST 2010
Hi Scott,
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?
>
>
Interesting 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.
André
--
Nokia Certified Qt Developer.
Interested in Qt related job offers or freelance Qt consulting work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100630/343e6835/attachment.html
More information about the Qt-interest-old
mailing list