1 Star 2 Fork 0

UWillno/QmlCardRow

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
main.qml 1.37 KB
Copy Edit Raw Blame History
UWillno authored 2024-05-29 10:52 . 改进,加注释
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
ApplicationWindow {
width: 640
height: 480
visible: true
title: qsTr("Hello World")
header: ToolBar {
ToolButton {
anchors.horizontalCenter: parent.horizontalCenter
text: "<"
font.pointSize: 22
visible: stack.depth !== 1
onClicked: stack.pop()
}
}
// 通用方法
Logic {
id:logic
}
StackView {
id:stack
anchors.fill: parent
initialItem: CustomPage{ }
// push和pop时的动画
pushEnter: Transition {
PropertyAnimation {
property: "opacity"
from: 0
to:1
duration: 200
}
}
pushExit: Transition {
PropertyAnimation {
property: "opacity"
from: 1
to:0
duration: 200
}
}
popEnter: Transition {
PropertyAnimation {
property: "opacity"
from: 0
to:1
duration: 200
}
}
popExit: Transition {
PropertyAnimation {
property: "opacity"
from: 1
to:0
duration: 200
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/uwillno/qmlcardrow.git
git@gitee.com:uwillno/qmlcardrow.git
uwillno
qmlcardrow
QmlCardRow
main

Search

23e8dbc6 1850385 7e0993f3 1850385