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

SplitView jumps to an incorrect width when resizing if another object in SplitView is not visible.

    XMLWordPrintable

Details

    • Windows
    • e11637d28 (dev), 955f2e032 (6.7), 328497337 (tqtc/lts-6.5)

    Description

      SplitView jumps to an incorrect width when resizing if another object in SplitView is not visible.

      If no object in SplitView is hidden, the resizing works correctly.

      To reproduce the issue, run the attached example project and resize "View 4".

      If line 36 is commented out, the issue doesn't appear.

      import QtQuick
      import QtQuick.Controls
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
          Page {
              title: "SplitView Demo"
              anchors.fill: parent
              SplitView {
                  anchors.fill: parent
                  orientation: Qt.Horizontal
                  Rectangle {
                      SplitView.preferredWidth: 200
                      SplitView.fillHeight: true
                      color: "blue"
                      Text {
                          anchors.centerIn: parent
                          text: "View 1"
                      }
                  }
                  Rectangle {
                      SplitView.preferredWidth: 200
                      SplitView.fillHeight: true
                      color: "green"
                      Text {
                          anchors.centerIn: parent
                          text: "View 2"
                      }
                  }
                  Rectangle {
                      SplitView.preferredWidth: 200
                      SplitView.fillHeight: true
                      visible: false
                      color: "red"
                      Text {
                          anchors.centerIn: parent
                          text: "View 3"
                      }
                  }
                  Rectangle {
                      SplitView.preferredWidth: 200
                      SplitView.fillHeight: true
                      color: "purple"
                      Text {
                          anchors.centerIn: parent
                          text: "View 4"
                      }
                  }
      
                  Rectangle {
                      SplitView.fillWidth: true
                      SplitView.fillHeight: true
                      color: "yellow"
                      Text {
                          anchors.centerIn: parent
                          text: "View 5"
                      }
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            mahdi.belila Mehdi Belila
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes