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

longPressed signal not emited if an DragHandler is active

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.13.0
    • None
    • Dell XPS 15 9560, Windows 10
    • Windows

    Description

      Example code:

      import QtQuick 2.13
      import QtQuick.Controls 2.13
      import QtQuick.Layouts 1.4
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          Column {
              spacing: 10
              Repeater {
                  model: 10
      
                  Rectangle {
                      width: 200
                      height: 60
                      color: tapHandler.pressed ? "yellow" : (dragHandler.active ? "red" : "grey")
      
                      Label {
                          text: "%1".arg(index)
                          font.pixelSize: 30
                      }
      
                      TapHandler {
                          id: tapHandler
      
                          onLongPressed: console.debug("Long pressed:", index)
                      }
                      DragHandler {
                          id: dragHandler
                      }
                  }
              }
      
          }
      }
      

      Steps to reproduce of the error:

      1. Press with the finger (touch screen) some of rectangles, drag it and hold (you must see the red rectangle.
      2. Try press and hold some other rectangle with other finger. The longPressed signal will not be emitted
      3. If DragHandler is not active, you can press multiple rectangles with multiple fingers and multiple longPressed will be emitted.

      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
            permotion88 Karol Polak
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes