https://github.com/benlau/viewstack.pri
ViewStack.pri - A stateless StackView
https://github.com/benlau/viewstack.pri
Last synced: 9 months ago
JSON representation
ViewStack.pri - A stateless StackView
- Host: GitHub
- URL: https://github.com/benlau/viewstack.pri
- Owner: benlau
- License: apache-2.0
- Created: 2017-01-12T12:48:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-17T14:47:32.000Z (over 7 years ago)
- Last Synced: 2025-03-09T01:12:02.551Z (9 months ago)
- Language: QML
- Homepage:
- Size: 18.6 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-qt-qml - viewstack.pri - ViewStack is a wrapper of StackView (QQC2) that provides a stateless interface. (QML Specific)
README
ViewStack.pri - A Stateless StackView
------------------------------------
ViewStack is a wrapper of StackView (QQC2) that provides a stateless interface. It could perform push/pop/replace transition according to the state change. It is useful for QuickFlux/QRedux based application.
Status: Working, but no document yet
Features
1. Push/pop/replace pages via a state variable. (stack property)
1. Custom transition effect per page
Example 1 - A single usage
```
ViewStack {
stack: ["page1" , "page2"]
model: Item {
property Component page1 : Rectangle {
color: "red"
}
property Component page2: Rectangle {
color: "green"
}
/// Set the default pushEnter animation for page2
property Transition page2_pushEnter : Transition {
/// ...
}
}
}
```
Installation
============
qpm install net.efever.viewstack