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

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

    XMLWordPrintable

Details

    • d7b5a48558 (qt/qtdeclarative/dev) d7b5a48558 (qt/tqtc-qtdeclarative/dev) 8e1c3f4dbe (qt/qtdeclarative/6.3) 8e1c3f4dbe (qt/tqtc-qtdeclarative/6.3) 5b30ba3436 (qt/qtdeclarative/6.4) 5b30ba3436 (qt/tqtc-qtdeclarative/6.4)

    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

        Issue Links

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

          Activity

            People

              anmaatta Antti Määttä
              qtcomsupport Qt Support
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: