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

QApplication:processEvents() prior to QApplication::exec() delays processing of previously queued DeferredDelete events

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 4.8.3
    • Core: Event loop
    • None
    • openSUSE 13.1, Qt 4.8.3 compiled from source for 32 bit on x86_64

    Description

      When QObject::deleteLater() is called before QApplication::exec(), the documentation says that the events are processed as soon as the event loop is entered. I can observe this behaviour.

      However, when I call QApplication::processEvents() before QApplication::exec(), possibly also via a modal QDialog::exec(), the DeferredDelete is only carried out after QApplication::quit()!

      I will attach example code. Change the

      #define PROCESS_EVENTS 1

      to see the differing behaviour.

      I would have expected the DeferredDelete to actually be processed either in the processEvents() call or at latest on QApplication::exec().

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            tvogel Tilman Vogel
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes