1 Star 0 Fork 0

BlackZero201/SplashScreen

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
MainView.qml 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
BlackZero201 提交于 2020-11-05 09:25 . add ClickWave
import QtQuick 2.6
import QtQuick.Window 2.3
import QtQuick.Controls 2.2
ApplicationWindow {
id: window
visible: true
width: 800
height: 600
title: "MainWindow"
flags: Qt.Window | Qt.FramelessWindowHint
x: (Screen.width - width) / 2
y: (Screen.height - height) / 2
background: Image {
id: backgroundImage
source: "qrc:/background.jpg"
}
Button {
id: buttonQuit
anchors {
top: parent.top
right: parent.right
margins: 0
}
text: "X"
font.pixelSize: 30
width: 50
height: 50
onClicked: Qt.quit()
}
Text {
text: qsTr("Hello,World")
anchors.centerIn: parent
font.pointSize: 30
color: "white"
}
MouseArea {
id: mouseArea
width: parent.width - buttonQuit.width
height: parent.height - buttonQuit.height
}
ClickWave {
id: wave
width: 30
height: 30
waveColor: "white"
}
Connections {
target: mouseArea
function onClicked(mouse) {
wave.clicked(mouse.x, mouse.y)
}
}
function showWindow() {
window.show()
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
QML
1
https://gitee.com/BlackZero201/splash-screen.git
git@gitee.com:BlackZero201/splash-screen.git
BlackZero201
splash-screen
SplashScreen
master

搜索帮助