Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.1
- Rectangle {
- color: "blue"
- height: childrenRect.height
- //height: 300
- width: 560
- Item {
- id: header
- anchors { top: parent.top; left: parent.left; right: parent.right }
- height: 60
- //height: childrenRect.height + 2 * 16
- Text {
- font.pixelSize: 24
- text: "Title"
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- }
- }
- Rectangle {
- color: "green"
- anchors { top: header.bottom; bottom: footer.top;
- left: parent.left; right: parent.right }
- //height: childrenRect.height + 2 * 32
- height: 50
- Text {
- font.pixelSize: 16
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- text: "some text"
- anchors { left: parent.left; right: parent.right;
- verticalCenter: parent.verticalCenter }
- }
- }
- Rectangle {
- id: footer
- anchors {
- bottom: parent.bottom;
- left: parent.left; right: parent.right
- }
- color: "red"
- height: 50
- //height: childrenRect.height + 2 * 16
- Text {
- font.pixelSize: 12
- text: "footer"
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement