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

Event execution order differs between Linux and Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.9.1
    • QPA: X11/XCB
    • None
    • Ubuntu 16.04 and Windows 10 both using Qt 5.9.1

       

    Description

      Summary

      The order of event execution differs between Linux and Windows for mousePressEvent, mouseReleaseEvent, and contextMenuEvent.

      Description

      Attached is a small qt project that will reproduce the issue. It is just a QPushButton that prints when it receives the above-mentioned events.

      Note: On windows I had to #undef main before the main function to get it to compile.

      Expected behavior:

      The events are processed in the same order on Linux and Windows.

      Actual behavior:

      When right clicking the widget that appears, on Linux the events will be processed in the following order:

       

      MOUSE DOWN
      CONTEXT MENU
      MOUSE UP

      On Windows the events will be processed in the following order:

      MOUSE DOWN
      MOUSE UP
      CONTEXT MENU

       

       Environment

      Linux:

      $ lsb_release -a
      No LSB modules are available.
      Distributor ID:    Ubuntu
      Description:    Ubuntu 16.04.2 LTS
      Release:    16.04
      Codename:    xenial

      Qt Version: 5.9.1 (installed from qt installer)

       

      Windows:

      OS: Windows 10

      Qt Version: 5.9.1 (installed from qt installer)

      Attachments

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

        Activity

          People

            paeglis Gatis Paeglis
            christopherpezley Christopher Pezley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes