[Qt-interest] Hiding a QDialog?

Scott Aron Bloom Scott.Bloom at onshorecs.com
Thu Jul 1 01:45:51 CEST 2010


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

 

Scott

 

From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Andre Somers
Sent: Wednesday, June 30, 2010 1:30 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Hiding a QDialog?

 

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/210a44c4/attachment.html 


More information about the Qt-interest-old mailing list