This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/test-layout.qml

40 lines
809 B
QML
Raw Normal View History

import QtQuick 2.0
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.15
ApplicationWindow {
visible: true
width: 450
height: 800
title: qsTr("Scroll")
Rectangle {
color: 'red'
width: childrenRect.width
height: childrenRect.height
2021-03-16 15:20:46 +08:00
ColumnLayout {
property int gravity: 0
onGravityChanged: {
console.log(children[0].Layout.alignment)
children[0].Layout.alignment = 1
}
spacing: 0
height: 600
2021-03-16 15:20:46 +08:00
Rectangle {
width: 100
height: 100
color: 'black'
}
2021-03-16 15:20:46 +08:00
Rectangle {
width: 100
height: 100
color: 'yellow'
}
}
}
}