代码拉取完成,页面将自动刷新
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Window 2.12
import QtGraphicalEffects 1.0 //渐变色需要导入的库
ApplicationWindow {
id:success
visible: true
width: 540
height: 380
title: "注册成功!"
//opacity: 1 // 初始完全不透明
flags: Qt.Window | Qt.FramelessWindowHint //属性,标题栏隐藏 无框窗口提示,必须要前面的,不然系统桌面菜单栏,看不到软件
property int dragx: 0 //属性命令要小写字母开头
property int dragy: 0
property bool isDrag: false
Rectangle{
objectName: "rect"
radius: 10 //设置主窗口圆角
width: parent.width
height: parent.height
anchors.centerIn: parent
gradient: Gradient{ //设置渐变色,渐变色优先级大于color颜色
GradientStop{position: 0; color: "#FFEBCD"}
GradientStop{position: 1; color: "#FF8247"}
orientation: Gradient.Horizontal // 设置方向
}
Text { //文本说明:登录系统
objectName:"tip"
anchors.centerIn: parent
width: 120
height: 30
font.pointSize: 22
text: qsTr("注册成功!")
color: "white"
}
}
Timer {
id: timer
interval: 1000 // 1秒
running: true
onTriggered: {
fadeOutAnimation.start(); // 开始动画
}
}
SequentialAnimation {
id: fadeOutAnimation
NumberAnimation { target: success; property: "opacity"; to: 0;
duration: 1000 } // 渐变到透明需要1秒时间
PropertyAction { target: success; property: "visible"; value:
false } // 设置visible为false,彻底隐藏窗口
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。