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

When propagateComposedEvents is set, drag does not always move the flickable

    XMLWordPrintable

    Details

      Description

      Run the following code. Don't click on any rectangle but start dragging the flickable -> the dragging does not occur. Then click on any rectangle and start dragging -> dragging occurs. After that, dragging sometimes works and sometimes does not - I did not find a sequence for that. If propagateComposedEvents is set to false, the dragging works all the time.

      import QtQuick 2.1
      import QtQuick.Window 2.0
      
      Rectangle
      {
          id: mainScreen
          width: 400
          height: 400
      
          color: "darkgray"
      
          // main grid
          Flickable{
              id: gridflick
              interactive: true
              anchors.fill: parent
              contentWidth: 900
              contentHeight: 900
      
              Column{
                  id: grid
                  x: 10
                  y: 10
                  spacing: 10
                  Repeater{
                      model: 5
                      Row{
                          height: 80
                          spacing: 10
                          Repeater{
                              model: 5
                              Rectangle{
                                  color: "steelblue"
                                  id: panel
      
                                  width: 80
                                  height: 80
                                  MouseArea{
                                      anchors.fill: parent
                                      propagateComposedEvents: true
                                      onClicked:{
                                          console.log("clicked")
                                      }
                                      onPressAndHold: {
                                          console.log("press and hold")
                                          // mouse.accepted = false
                                      }
                                      onPressed: {
                                          console.log("pressed")
                                      }
                                  }
                              }
                          }
                      }
                  }
              }
      
              onMovementEnded: {
                  console.log(" onMovementEnded")
              }
              onMovementStarted: {
                  console.log("onMovementStarted")
              }
          }
      
          focus: true
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            qtcomsupport Qt Support
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes