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

After replacing out item from StackView it has wrong dimensions on orientation change

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.7.0 RC
    • 5.7.0 Beta
    • Quick: Controls 2
    • None
    • Android 4.4
    • 9b682c12c443f799f5e38cf0a76acfc3754e9e56

    Description

      When item replaced from StackView and returned back, it has wrong dimensions. I can reproduce it on Android: run test program, click on "replace", click on "back" and rotate the device.

      Test program:

      import QtQuick 2.6
      import QtQuick.Controls 2.0
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          Rectangle {
              id: first
      
              color: "red"
      
              Button {
                  anchors.centerIn: parent
                  text: "replace"
                  onClicked: stackView.replace(null, second)
              }
          }
      
          Component {
              id: second
      
              Rectangle {
                  color: "blue"
      
                  Button {
                      anchors.centerIn: parent
                      text: "return"
                      onClicked: stackView.replace(null, first)
                  }
              }
          }
      
          StackView {
              id: stackView
      
              anchors.fill: parent
              initialItem: first
          }
      }
      

      If I made first to be a Component, it has proper size after replacing back.

      Attachments

        Activity

          People

            krnekit Nikita Krupenko
            krnekit Nikita Krupenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: