Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, January 2007
Number of pending events


Message 1 in thread

Fellow Qt users,

is there any way to get the number of pending (custom) events in the
event queue? I am developing a real time application using Qt. When
data arrives (in a separate thread), it's posted on the event queue as
custom QEvent objects. I would like to be able to monitor the number
of pending events to determine if data is being received faster than
it can be processed and displayed. Is there any quick way to do this?


Rgds,
Jarle

--
 [ signature omitted ] 

Message 2 in thread

Jarle Anfinsen wrote:
> is there any way to get the number of pending (custom) events in the
> event queue? 

None that I am aware of.

> I am developing a real time application using Qt. When
> data arrives (in a separate thread), it's posted on the event queue as
> custom QEvent objects. I would like to be able to monitor the number
> of pending events to determine if data is being received faster than
> it can be processed and displayed. Is there any quick way to do this?

Bump some variable when an event is put into the queue and decrement
it when it was handled/removed from the queue.

Andre'

--
 [ signature omitted ] 

Message 3 in thread

>
> is there any way to get the number of pending (custom) events in the
> event queue? I am developing a real time application using Qt. When
> data arrives (in a separate thread), it's posted on the event queue as
> custom QEvent objects. I would like to be able to monitor the number
> of pending events to determine if data is being received faster than
> it can be processed and displayed. Is there any quick way to do this?

If you come up with a nice way of doing this, please post it to the  
list.  I'm certainly interested in this topic as well.

Thanks,
Caleb

--
 [ signature omitted ]