[Qt-interest] How to queue events until I say to process them...
Jeffrey Brendecke
jwbrendecke at icanetix.com
Tue Feb 9 22:10:35 CET 2010
Please excuse me, I meant the following for number 2:
http://www.boost.org/doc/libs/1_42_0/doc/html/function.html
--------------------
Date: Tuesday 09 February 2010 21:34
From: Jeffrey Brendecke <jwbrendecke at icanetix.com>
To: qt-interest at trolltech.com
Cc:
Subject: Re: [Qt-interest] How to queue events until I say to process them...
--------------------
> I see a couple of options:
>
> 1. Create some functors wrapping what you want to do and put them in a
> QQueue and process when ready.
> 2. Use a function type such as the boost function object adapters and put
> them in a QQueue.
>
> Option 1. allows you to include some state to be stored for use by the
> function at call time or thereafter in addition to providing more
> flexibility with respect to return types and signature overrides.
>
>
> --------------------
> Date: Tuesday 09 February 2010 21:10
> From: Eric Clark <eclark at ara.com>
> To: "Qt Interest (qt-interest at trolltech.com)" <qt-interest at trolltech.com>
> Cc:
> Subject: [Qt-interest] How to queue events until I say to process them...
> --------------------
>
> > Hello Everyone,
> >
> > I would like to implement an event queue of some sorts that does not
> > actually process the events until I say it can process them. I have
> > somewhat of an idea of what I need to do. Basically, I should override
> > the QCoreApplication::notify and instead of notifying the object
> > immediately, post it to the object's event queue for processing when the
> > object is ready. Before I try this, I would like to know two things:
> >
> >
> > 1. When does the QEvent object actually get deleted? Is it after
> > the call to notify? Or is it in the default implementation of notify,
> > thus making it my responsibility to delete the event if I override
> > QCoreApplication::notify?
> >
> > 2. Is there a better, or should I say a Qt, way of implementing
> > this type of queue?
> >
> > Thank You in advance!
> > Eric
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list