Please reformat this pseudocode and wrap it in '@' tags.
It's generally considered better to use the event loop together with signals and slots, rather that waiting explicitly. But, if you insist, this piece of code should do the work:
@
forever {
if (isAnswer == true)
break;
else
qApp->processEvents();
}
@