Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.3
- import QtQuick.Controls 1.2
- ApplicationWindow {
- title: qsTr("Hello World")
- width: 640
- height: 480
- StackView {
- id: stackView
- delegate: StackViewDelegate {
- pushTransition: StackViewTransition {
- PropertyAnimation {
- target: enterItem
- property: "x"
- from: target.width
- to: 0
- duration: 400
- easing.type: Easing.OutCubic
- }
- }
- }
- initialItem: pageComponent
- }
- Component {
- id: pageComponent
- Rectangle {
- Text { anchors.centerIn: parent ; text: stackView.depth }
- color: "lightgray"
- border.color: "gray"
- MouseArea {
- anchors.fill: parent
- onClicked: stackView.push( pageComponent )
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement