Qt5.2
Studying StackView but have no idea how to use it.
    
	
	- import QtQuick 2.2 
-     import QtQuick.Controls 1.1 
-   
-     Rectangle { 
-         id: root 
-   
-         width: 360 
-         height: 360 
-   
-         Column{ 
-   
-             Button{ 
-                 width: root.width 
-                 height: root.height / 10 
-   
-                 onClicked: { 
-                     stackView.push({item:Rectangle, properties: {width: root.width, height: root.height}}) 
-                 } 
-             } 
-   
-             StackView { 
-                 id: stackView 
-                 delegate: StackViewDelegate { 
-                     function transitionFinished(properties) 
-                     { 
-                         properties.exitItem.opacity = 1 
-                     } 
-   
-                     property Component pushTransition: StackViewTransition { 
-                         PropertyAnimation { 
-                             target: enterItem 
-                             property: "opacity" 
-                             from: 0 
-                             to: 1 
-                         } 
-                         PropertyAnimation { 
-                             target: exitItem 
-                             property: "opacity" 
-                             from: 1 
-                             to: 0 
-                         } 
-                     } 
-                 } 
-             } 
-         } 
-     } 
        import QtQuick 2.2
    import QtQuick.Controls 1.1
     
    Rectangle {
        id: root
     
        width: 360
        height: 360
     
        Column{
     
            Button{
                width: root.width
                height: root.height / 10
     
                onClicked: {
                    stackView.push({item:Rectangle, properties: {width: root.width, height: root.height}})
                }
            }
     
            StackView {
                id: stackView
                delegate: StackViewDelegate {
                    function transitionFinished(properties)
                    {
                        properties.exitItem.opacity = 1
                    }
     
                    property Component pushTransition: StackViewTransition {
                        PropertyAnimation {
                            target: enterItem
                            property: "opacity"
                            from: 0
                            to: 1
                        }
                        PropertyAnimation {
                            target: exitItem
                            property: "opacity"
                            from: 1
                            to: 0
                        }
                    }
                }
            }
        }
    }
To copy to clipboard, switch view to plain text mode 
  
				
			
Bookmarks