[Solved] About QCoreApplication::flush ()
-
wrote on 23 Apr 2013, 07:12 last edited by
Hi,
I wanted to know what QCoreApplication::flush () does?
When is it used & why?
An example would be really helpful to understand.
I am using a GUI QApplication, so is that of any help to me?
Thank You, -
wrote on 23 Apr 2013, 07:56 last edited by
Why didn't you read the documentation for "flush":http://qt-project.org/doc/qt-4.8/qcoreapplication.html#flush ?
-
wrote on 23 Apr 2013, 08:22 last edited by
I read, but I could not understand what was written.
That is why asked. -
wrote on 23 Apr 2013, 08:27 last edited by
It is used when you want to flush a queue of events to be called immediately. Splash screen is the best example.
-
wrote on 23 Apr 2013, 08:54 last edited by
What exactly do you mean by "flush"?
From what I can understand it is something similar to processEvents() right?
If yes then what is the difference? -
wrote on 23 Apr 2013, 08:58 last edited by
Yes. Only that flush does this for all pending events at once while processEvents handles them one by one
-
wrote on 23 Apr 2013, 09:02 last edited by
ok. Thanks for the answer.
-
wrote on 19 Apr 2017, 14:30 last edited by
What it really does is, it calls qApp->sendPostedEvents(), see https://bugreports.qt.io/browse/QTBUG-33489