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

MouseEvent param or positionChange signal of MouseArea always has Qt.NoButton value

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.5.1
    • None
    • Win
    • Windows

    Description

      import QtQuick
      MouseArea {
          width: 600
          height: 600
          onPositionChanged: (event) => {
              console.log(event.button)
          }
      } 

      If I press left mouse button and drag mouse cursor over window, following is printed in console:

      qml: 0
      qml: 0
      qml: 0
      ...

      According to https://doc.qt.io/qt-6/qml-qtquick-mousearea.html#positionChanged-signal it should contain buttons pressed while dragging:

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            diredko diredko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes