89 lines
2.1 KiB
Text
89 lines
2.1 KiB
Text
|
/*
|
||
|
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
|
||
|
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
|
||
|
this file manually, you might introduce QML code that is not supported by Qt Design Studio.
|
||
|
Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files.
|
||
|
*/
|
||
|
|
||
|
import QtQuick 6.2
|
||
|
import QtQuick.Controls 6.2
|
||
|
import NativGuiAlisa
|
||
|
|
||
|
Rectangle {
|
||
|
id: rectangle
|
||
|
width: Constants.width
|
||
|
height: Constants.height
|
||
|
|
||
|
color: Constants.backgroundColor
|
||
|
|
||
|
Button {
|
||
|
id: button
|
||
|
text: qsTr("Press me")
|
||
|
anchors.verticalCenter: parent.verticalCenter
|
||
|
anchors.verticalCenterOffset: 12
|
||
|
anchors.horizontalCenterOffset: 1
|
||
|
checkable: true
|
||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||
|
|
||
|
Connections {
|
||
|
target: button
|
||
|
onClicked: animation.start()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Text {
|
||
|
id: label
|
||
|
text: qsTr("Hello NativGuiAlisa")
|
||
|
anchors.top: button.bottom
|
||
|
font.family: Constants.font.family
|
||
|
anchors.topMargin: 45
|
||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||
|
|
||
|
SequentialAnimation {
|
||
|
id: animation
|
||
|
|
||
|
ColorAnimation {
|
||
|
id: colorAnimation1
|
||
|
target: rectangle
|
||
|
property: "color"
|
||
|
to: "#2294c6"
|
||
|
from: Constants.backgroundColor
|
||
|
}
|
||
|
|
||
|
ColorAnimation {
|
||
|
id: colorAnimation2
|
||
|
target: rectangle
|
||
|
property: "color"
|
||
|
to: Constants.backgroundColor
|
||
|
from: "#2294c6"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
DelayButton {
|
||
|
id: delayButton
|
||
|
x: 912
|
||
|
y: 422
|
||
|
text: qsTr("Delay Button")
|
||
|
}
|
||
|
|
||
|
Pane {
|
||
|
id: pane
|
||
|
x: 113
|
||
|
y: 52
|
||
|
width: 1693
|
||
|
height: 56
|
||
|
}
|
||
|
states: [
|
||
|
State {
|
||
|
name: "clicked"
|
||
|
when: button.checked
|
||
|
|
||
|
PropertyChanges {
|
||
|
target: label
|
||
|
text: qsTr("Button Checked")
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|