qt-interest@trolltech.com
[Top] [All Lists]

Re: [Qt-interest] Hiding a QDialog?

Subject: Re: [Qt-interest] Hiding a QDialog?
From: Ian Thomson
Date: Wed, 30 Jun 2010 09:32:16 +0100
Hi,

Jan wrote:
> Actually I am doing something like this. It seems to work. Though I read 
> using "goto" is regarded as "bad code".

Yes it is. To avoid goto you should structure it like this.

QDialog dlg;

do
{
   if (dlg.exec() != QDialog::Accepted)
     return;
} while (dlg.somethingIsWrong());

_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest

<Prev in Thread] Current Thread [Next in Thread>