Advertisement
Guest User

Untitled

a guest
Jul 1st, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. import QtQuick 2.3
  2. import QtQuick.Controls 1.2
  3.  
  4. ApplicationWindow {
  5. title: qsTr("Hello World")
  6. width: 640
  7. height: 480
  8.  
  9. StackView {
  10. id: stackView
  11. delegate: StackViewDelegate {
  12. pushTransition: StackViewTransition {
  13. PropertyAnimation {
  14. target: enterItem
  15. property: "x"
  16. from: target.width
  17. to: 0
  18. duration: 400
  19. easing.type: Easing.OutCubic
  20. }
  21. }
  22. }
  23. initialItem: pageComponent
  24.  
  25. }
  26.  
  27. Component {
  28. id: pageComponent
  29. Rectangle {
  30. Text { anchors.centerIn: parent ; text: stackView.depth }
  31. color: "lightgray"
  32. border.color: "gray"
  33. MouseArea {
  34. anchors.fill: parent
  35. onClicked: stackView.push( pageComponent )
  36. }
  37. }
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement