服务器租用Qt13 对lottie的服务器支持 如何运用服务器来操作
服务器咨询敏敏QQ:2853898501 / 3007425289 电话微信:18316411879
Lottie
自行百度
Qt Lottie使用
安装Qt 13
新建quick app
修改main.qml文件内容
import QtQuick 2.13
import QtQuick.Window 2.13
import Qt.labs.lottieqt 1.0
Window {
id:window
visible: true
width: 640
height: 480
title: qsTr("Hello World")
Rectangle {
id: root
width: 640
height: 480
property bool selected: false
LottieAnimation {
id: animation
anchors.centerIn: parent
// source: ":/1708-success.json"
//source: ":/202-setting.json"
source: ":/2887-listen-state.json"
scale:0.4
autoPlay: false
onFinished: {
if(root.selected){
animation.start();
}
}
}
MouseArea {
anchors.fill: parent
id:mouseArea
onPressAndHold:{
animation.play();
root.selected = !root.selected
}
onReleased: {
root.selected =false
}
|