Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2

Peeping into the event loop

    XMLWordPrintable

Details

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bhughes Bradley T. Hughes (closed Nokia Identity) (Inactive)
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes