QML学习
main.qml
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
Window {
width: 640
height: 480
visible: true
title: qsTr("DelayButton")
DelayButton {
id: delayButton
x: 10
y: 10
delay: 1000
text: "一键三连"
onActivated: {
logText.text = "已三连"
}
onPressed: {
logText.text = ""
}
// 内容视图
contentItem: Text {
text: delayButton.text
anchors.centerIn: delayButton
font.pointSize: