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

QWindowSystemInterface::flushWindowSystemEvents flaw

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.3.0, 5.15
    • QPA
    • None
    • macOS

    Description

      Please have a look at the stack trace's picture.
      I get a crash in my application because some code of mine, dependent on user input, is called at unexpected time.

      The typical scenario is when a widget is shown. This causes the event queue, including user events, to be flushed. We certainly don't expect user events to be processed when "setVisible" is called on a widget.
      I get this on Mac, but got it once on Windows too (in this case, a tip window move caused the flushing).

      I see this as a design flaw (never had this in Qt 4.8): the user input events should not be flushed when showing a window, and actually in most contexts.

      QWindowSystemInterface::flushWindowSystemEvents()
      should have a QEventLoop::ProcessEventsFlag argument, just as sendWindowSystemEvents has.

      Attachments

        For Gerrit Dashboard: QTBUG-39842
        # Subject Branch Project Status CR V

        Activity

          People

            kleint Friedemann Kleint
            jirauser26727 user-04d21 (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated: