hello world
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import FancyInput.Controls
|
||||
|
||||
// 阶段 0:Hello World 骨架
|
||||
// 窗口尺寸沿用 WPF 主窗 600x480,主题色 #651F65
|
||||
ApplicationWindow {
|
||||
id: root
|
||||
width: 600
|
||||
height: 480
|
||||
visible: true
|
||||
title: qsTr("FancyInput · Qt 迁移版(阶段 0)")
|
||||
|
||||
color: Theme.background
|
||||
|
||||
ColumnLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: 16
|
||||
|
||||
// Logo 占位:后续替换为 WPF 版图标
|
||||
Rectangle {
|
||||
Layout.preferredWidth: 96
|
||||
Layout.preferredHeight: 96
|
||||
radius: 16
|
||||
color: Theme.accent
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "FI"
|
||||
font.family: Theme.fontFamily
|
||||
font.pixelSize: 32
|
||||
font.bold: true
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("FancyInput · Hello Qt")
|
||||
font.family: Theme.fontFamily
|
||||
font.pixelSize: 24
|
||||
font.bold: true
|
||||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("阶段 0:工程骨架跑通")
|
||||
font.family: Theme.fontFamily
|
||||
font.pixelSize: 13
|
||||
color: Theme.textSecondary
|
||||
}
|
||||
|
||||
// 验证主题单例 + 控件可用
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("点击次数:%1").arg(root.clickCount)
|
||||
font.family: Theme.fontFamily
|
||||
onClicked: {
|
||||
root.clickCount++
|
||||
console.log("点击次数:", root.clickCount)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property int clickCount: 0
|
||||
}
|
||||
Reference in New Issue
Block a user