[Qt-interest] QEventLoop and QEvents
Eric Clark
eclark at ara.com
Mon Feb 22 16:46:59 CET 2010
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Frank Hemer
> Sent: Monday, February 22, 2010 9:43 AM
> To: qt-interest at trolltech.com
> Subject: Re: [Qt-interest] QEventLoop and QEvents
>
> On Monday 22 February 2010 16:25:17 Eric Clark wrote:
>
> > > An eventloop is _PROCESSING_ the events, its not a storage class.
> > >
> > > Use a QQueue to store the event copies and their receiver.
> > > And post them later using QApplication::postEvent.
> >
> > I thought that an event loop used a queue to store the events until
> > processEvents was called on it... Is this incorrect? If I never call
> exec
> > on the event loop, will it not store the events that I post to it
> until I
> > either call exec or processEvents?
>
> Its definitely not made for this usecase - however I didn't check the
> sources
> whether it might work or not.
> Note that QEventLoop will not only receive your events ...
>
> If you simply want to store events and post them delayed its much
> easier to
> implement it using a QQueue (I successfully did that a while ago).
> And you're independant of the qt internals of QEventLoop ...
Makes sense. I will try this and see if I can get it to work. Thanks!
>
> Frank
> _______________________________________________
> 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