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

QWindowSystemInterface::flushWindowSystemEvents flaw

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.3.0
    • Fix Version/s: None
    • Component/s: QPA
    • Labels:
      None
    • Platform/s:
      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

            Assignee:
            kleint Friedemann Kleint
            Reporter:
            philippe Philippe Goutier
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Dates

              Created:
              Updated: