[Qt-interest] QCoreApplication derived class' slots not being called
Thiago Macieira
thiago.macieira at trolltech.com
Wed Jan 21 19:11:33 CET 2009
Em Quarta-feira 21 Janeiro 2009, às 17:32:59, Andrea Franceschini escreveu:
> 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?
Hi Andrea
You haven't told us yet why you want to override exec(). We can't help you find
a solution for processing events if you don't tell us what behaviour of the
current event loop model you're trying to modify.
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Software Engineer - Nokia, Qt Software
Qt Software is hiring - ask me
Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090121/6696c075/attachment.bin
More information about the Qt-interest-old
mailing list