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/resources/test-layout.qml

58 lines
1.1 KiB
QML
Raw Normal View History

import QtQuick 2.0
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.15
ApplicationWindow {
visible: true
2021-04-23 17:56:08 +08:00
width: 600
height: 800
title: qsTr("Scroll")
2021-04-16 10:06:15 +08:00
ScrollView {
property var wrapper
2021-04-16 10:06:15 +08:00
width: 200
height: 200
2021-03-16 15:20:46 +08:00
2021-04-16 16:44:08 +08:00
ScrollBar.horizontal.policy: ScrollBar.AlwaysOn
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
2021-04-16 10:06:15 +08:00
clip: true
// property var uuid: Util.uuidv4()
property var tag: "Scroller"
background: Rectangle {
id: bg
color: 'red'
}
property var backgroundColor
2021-03-16 15:20:46 +08:00
2021-04-16 10:06:15 +08:00
onBackgroundColorChanged: {
bg.color = backgroundColor
}
onWidthChanged: {
bg.implicitWidth = width
console.log(tag, uuid + " onWidthChanged: " + this.width)
}
onHeightChanged: {
bg.implicitHeight = height
console.log(tag, uuid + " onHeightChanged: " + this.height)
}
2021-04-16 16:44:08 +08:00
Rectangle {
implicitWidth: 400
implicitHeight: 400
2021-04-16 10:06:15 +08:00
2021-04-16 16:44:08 +08:00
Label {
text: "ABC"
font.pixelSize: 124
}
2021-04-16 10:06:15 +08:00
}
}
}