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

Calling swipe.close() on already closed SwipeDelegate triggers onClosed

    XMLWordPrintable

Details

    • f3a64b13725081eb94b05dbeb5f68a2298c9163e (qt/qtquickcontrols2/dev) 2ee9e0c2d8cb8dc066f15ef488630d455947fd6a (qt/qtquickcontrols2/5.15)

    Description

      To reproduce, click the item.

      import QtQuick 2.12
      import QtQuick.Controls 2.15
      import QtQuick.Layouts 1.0
      
      ApplicationWindow {
          width: 800
          height: 400
          visible: true
      
          property int swipeWidth: width / 2
      
          SwipeDelegate {
              id: swipeDelegate
              text: "click me"
              width: parent.width
              height: 76
      
              onClicked: {
                  swipe.close()
              }
      
              swipe.onClosed: console.log("onClosed() triggered")
      
              swipe.left: Rectangle {
                  anchors.left: parent.left
                  width: swipeWidth
                  height: parent.height
                  color: "green"
              }
          }
      }
      

      Attachments

        Activity

          People

            mitch_curtis Mitch Curtis
            poikelin Joni Poikelin
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: