[Interest] QNetwork classes for submitting google forms

Thiago Macieira thiago.macieira at intel.com
Sun Jun 13 19:08:45 CEST 2021

On Sunday, 13 June 2021 08:23:30 PDT Max Paperno wrote:
> > Please do as I said: insert a return and let the event loop handle calling
> > your slots.
> Did you even look at the (bad) code in question? There was no event loop
> and nothing to return from except main().

That was a toy example application. Most applications will post in event to 
something happening, so the event loop has already started.

In the particular you need app.exec().

> > Don't use processEvents(). That's only slightly less evil than sleep().
> Maybe you could expand on that further instead of just making blanket
> statements?  Reference?

The reference is the source code.

QEventLoop calls processEvents for you, but it also reacts to quit() and other 
event-interruption mechanisms, as well as interrupt-prevention mechanisms. If 
you call processEvents() on your own, you have to provide your own mechanism. 
Many an application got stuck calling processEvents() after being asked to 
exit that loop.

If you think you need to exclude UI events, you're wrong.

If you think you want to process a limited number of events (especially "just 
one"), you're wrong.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering

More information about the Interest mailing list