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

SwipeDelegate's contentItem is not resized automatically when the control's height changes

    XMLWordPrintable

Details

    • e9becf6931e9ff12b8912ddb79e4b2cbdd2d530a

    Description

      In the code below, QQuickControl::resizeContent() is never called because of this check.

      import QtQuick 2.8
      import QtQuick.Window 2.2
      import QtQuick.Controls 2.1
      
      Window {
          visible: true
          width: 300
          height: 480
          title: qsTr("Hello World")
      
          SwipeDelegate {
              id: swipeDelegate
              text: "Howwwwwwwwwwwwwwwwww"
              width: parent.width
      
              NumberAnimation {
                  id: anim
                  target: swipeDelegate
                  property: "height"
                  to: 0
                  easing.type: Easing.InOutQuad
              }
      
              swipe.right: Row {
                  anchors.right: parent.right
                  height: parent.height
      
                  Label {
                      id: deleteLabel
                      text: qsTr("Delete")
                      color: "white"
                      verticalAlignment: Label.AlignVCenter
                      padding: 12
                      height: parent.height
      
                      SwipeDelegate.onClicked: anim.start()
      
                      background: Rectangle {
                          color: deleteLabel.SwipeDelegate.pressed ? Qt.darker("tomato", 1.1) : "tomato"
                      }
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            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