Details
-
Suggestion
-
Resolution: Out of scope
-
P2: Important
-
3.x
-
None
Description
There is hasPendingEvents(), but it would be nice if one could figure out if a certain event is in the event loop, if the user has pressed escape. That would allow for some level of interactiveness even in a blocking operation (like a long rendering) without slowing the operation down with calls to processEvents().
Update: We are currently researching different solutions to allow peeping into the event loop.
Update: Instead of providing a way to peek for a single event of a certain type in a cross-platform manner, we are considering adding more QEventLoop::ProcessEventsFlags the specify the types of events the programmer is interested in. For example, qApp->processEvents(QEventLoop::OnlyUserInputEvents); would solve the most commonly requested behavior: allowing the user to cancel a QProgressDialog that is driven by a long running function.
Update:
Adding these ProcessEventsFlags is a different idea than what is originally suggested in this task. Currently, these flags are the most attractive solution to date. Implementing functions to find and possibly remove individual events is currently not planned.