[Qt-interest] QCoreApplication derived class' slots not being called

Bradley T. Hughes bradley.hughes at nokia.com
Thu Jan 22 09:08:16 CET 2009


Andrea Franceschini wrote:
> 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?

QEventLoop::exec() ?

-- 
Bradley T. Hughes (Nokia-D-Qt/Oslo), bradley.hughes at nokia.com
Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway



More information about the Qt-interest-old mailing list