我希望容器由以下组件填充:
DataSourceList
从下而上Toolbox
,PowerSwitchList
和RecordingList
从上到下增长。 RecordingList
是可滚动的,应该会填充所有剩余空间这可能吗?
这是一次失败的尝试,除了DataSourceList不可见之外,其他所有情况看起来都很好
Item {
ToolBox {
id: toolBox
anchors.top: parent.top
anchors.topMargin: 1
anchors.left: parent.left
anchors.right: parent.right
}
PowerSwitchList {
id: powerSwitchList
anchors.top: toolBox.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: 1
}
DataSourceList {
id: dataSourceList
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
}
RecordingList {
id: recordingList
anchors.top: powerSwitchList.bottom
anchors.topMargin: 5
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: dataSourceList.top
}
}
这是一次失败的尝试,一切看上去都很糟糕
ColumnLayout {
ToolBox {
id: toolBox
Layout.alignment: Qt.AlignTop
}
PowerSwitchList {
id: powerSwitchList
Layout.alignment: Qt.AlignTop
}
RecordingList {
Layout.alignment: Qt.AlignTop
id: recordingList
}
DataSourceList {
id: dataSourceList
Layout.alignment: Qt.AlignBottom
}
}