0
にQMLのアイテムを固定することはできませんなぜ私はこのコードを持っている:私は1つ別の
import QtQuick 2.7
import QtQuick.Window 2.2
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
Rectangle {
anchors.fill: parent
Rectangle {
id: rect1
anchors.top: parent.top
anchors.left: parent.left
anchors.right: rect2.left
anchors.bottom: parent.bottom
color: "red"
}
Rectangle {
id: rect2
anchors.top: parent.top
anchors.left: rect1.right
anchors.right: parent.right
anchors.bottom: parent.bottom
color: "blue"
}
}
}
私はお互いに2 rectsを固定したいので、次の出力が生成されます。
をなぜ私のコードはそうしないのですか?レイアウトを使わない方がいいです...