import QtQuick 2.0 import QtQuick.Layouts 1.0 Rectangle { width: 360 height: 360 Loader { id: loader width: parent.width height: (loader.sourceComponent == one ? 30 : 150) anchors.centerIn: parent sourceComponent: one } Component { id: one ColumnLayout { RowLayout { Layout.fillHeight: true Layout.fillWidth: true Rectangle { Layout.fillHeight: true Layout.fillWidth: false implicitWidth: height color: "red" } Rectangle { Layout.fillHeight: true Layout.fillWidth: true color: "blue" } } } } Component { id: two Rectangle { color: "black" } } }