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

Beginning a swipe over a Label in SwipeDelegate's right item causes wrong item to be exposed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.8.0 Alpha
    • Fix Version/s: 5.8.0 RC
    • Component/s: Quick: Controls 2
    • Labels:
      None
    • Commits:
      aa06a424c5b40d7961a3928e12e59a0aff855675

      Description

      import QtQuick 2.7
      import QtQuick.Controls 2.1
      import QtQuick.Controls.Material 2.0
      
      ApplicationWindow {
          width: 300
          height: 400
          visible: true
      
          ListView {
              model: 10
              anchors.fill: parent
      
              delegate: SwipeDelegate {
                  id: delegate
                  text: index
                  width: parent.width
      
                  background.opacity: 0.5
      
                  swipe.left: Rectangle {
                      width: parent.width
                      height: parent.height
                      color: Material.color(Material.Green, SwipeDelegate.pressed ? Material.Shade700 : Material.Shade500)
      
                      Label {
                          text: "Left"
                          color: "white"
                          anchors.margins: 10
                          anchors.left: parent.left
                          anchors.verticalCenter: parent.verticalCenter
                      }
      
                      SwipeDelegate.onClicked: delegate.swipe.close()
                  }
      
                  swipe.right: Rectangle {
                      width: parent.width
                      height: parent.height
                      anchors.right: parent.right
                      color: Material.color(Material.Red, SwipeDelegate.pressed ? Material.Shade700 : Material.Shade500)
      
                      Label {
                          text: "Right"
                          color: "white"
                          anchors.margins: 10
                          anchors.right: parent.right
                          anchors.verticalCenter: parent.verticalCenter
                      }
      
                      SwipeDelegate.onClicked: delegate.swipe.close()
                  }
              }
          }
      }
      

        Attachments

        For Gerrit Dashboard: QTBUG-57271
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            mitch_curtis Mitch Curtis
            Reporter:
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes