[Qt-interest] another QEventLoop question
Joshua Grauman
jnfo-c at grauman.com
Fri Mar 4 21:31:56 CET 2011
Hello all,
I'm trying to figure out how to get a QEventLoop to work properly. I think
I pretty much undestand it, but I saw this in the Qt code. Could someone
tell me the point of the guard variable below and why it is being checked
to see if it is null? Under what case would it be null? Thanks!
Josh
QEventLoop eventLoop;
d->eventLoop = &eventLoop;
QPointer<QDialog> guard = this;
(void) eventLoop.exec(QEventLoop::DialogExec);
if (guard.isNull())
return QDialog::Rejected;
d->eventLoop = 0;
More information about the Qt-interest-old
mailing list