[Interest] how to get and purge events from queue?
giuseppe.dangelo at kdab.com
Thu Nov 5 11:06:24 CET 2020
Il 05/11/20 05:38, David M. Cotter ha scritto:
> when scrolling, the scroll for my app is a bit sluggish (do not ask about that)
> which means that mouse wheel scroll events can pile up in the queue while the first scroll event is being processed.
> meaning that a dozen more*slow* events get handled after the user stops scrolling.
> what i want to do is: when i get a wheel scroll event, at that moment i see if there are MORE scroll events in the queue. if not, i just handle this event. but if there ARE i want to get the most recent one, and handle only that ONE event, while purging the rest.
There is some sort of input event compression available through
application flags. For the rest, you could just not act on events that
happen too close together (either wait a bit before acting, so to get N
events, or act on the first one and ignore the subsequent ones in a
short time frame).
But there's just no public access to the pending event queue.
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4329 bytes
Desc: Firma crittografica S/MIME
More information about the Interest