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

61 lines
1.3 KiB
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")
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 10:06:15 +08:00
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
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)
}
MouseArea {
anchors.fill: parent
onClicked: {
console.log(tag, uuid + " wrapper: " + wrapper)
mouseAreaBridge.onClick(wrapper)
}
}
2021-04-16 10:06:15 +08:00
Label {
text: "ABC"
font.pixelSize: 224
}
}
}