[Qt-interest] QCoreApplication derived class' slots not being called
Andrea Franceschini
therealmorpheu5 at gmail.com
Wed Jan 21 17:32:59 CET 2009
Free-hugging myself again -- not so desperate for love but I found a
solution I think it's feasible:
int Glyphs::Application::exec() {
forever {
processEvents(QEventLoop::AllEvents | QEventLoop::WaitForMoreEvents);
}
}
Ok, but why did I have to look inside the sources of Qt to infer it?
One may guess by reading the docs for QEventLoop and spotting this
WaitForMoreEvents, then try it and happily jump around the room but
it's not scientific at all given we're just programming, not doing mad
science... :)
Anyway, this makes my application consume very few cpu time and I'm
happy but again: is there anything better?
Thanks.
More information about the Qt-interest-old
mailing list