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

SplitView does not react properly to an orientation change

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.1.1
    • 5.1.0
    • Quick: Controls 1
    • None
    • 2c4f86f

    Description

      Changing the orientation of a SplitView after Component.onCompleted does not trigger a relayout. The Splitter icon does change, though.
      While this is not a common case for applications it is valid use case and
      it has to work for the visual designer.

      import QtQuick 2.0
      import QtQuick.Controls 1.0
      import QtQuick.Dialogs 1.0
      import QtQuick.Layouts 1.0
      
      Rectangle {
          id: root
          width: 20
          height: 20
      
          SplitView {
              anchors.fill: parent
              id: splitView
              orientation: Qt.Horizontal
              Rectangle {
                  width: 200
                  height: 200
                  color: "red"
                  MouseArea {
                      anchors.fill: parent
                      onClicked: {
                          splitView.orientation = Qt.Horizontal
                      }
                  }
              }
              Rectangle {
                  width: 200
                  height: 200
                  color: "yellow"
                  MouseArea {
                      anchors.fill: parent
                      onClicked: {
                          splitView.orientation = Qt.Vertical
                          print("clicked")
                      }
                  }
              }
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            richard Richard Moe Gustavsen
            thohartm Thomas Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes