Effetto transizione universale
Unsolved
Italian
-
Sto lavorando su un'applicazione turistica. In una schermata divisa in due colonne di due elementi ciascuna, inserisco 4 item come il seguente,
import QtQuick 2.14 Item { property alias posiX: rect.x property alias posiY: rect.y Rectangle { id:rect width: 50 height: 50 border.color: "black" border.width: 2 state: "inizio" Loader { property bool running : false width:parent.width height: parent.height id:loaderpage1 } MouseArea { anchors.fill: parent onClicked: { switch(rect.state) { case"inizio":rect.state="fine";break case"fine":rect.state="inizio";break } } } // STATO BASATO SULLE DIMENSIONI states: [ State { name: "inizio" PropertyChanges { target: loaderpage1; source:""; } PropertyChanges { target: rect; width:50; height:50; } }, State { name:"fine" PropertyChanges { target: loaderpage1; source:"Video.qml"; } PropertyChanges { target: rect1; width:wind.width; height:wind.height; } } ] transitions: [ Transition { from: "inizio";to: "fine" reversible: true ParallelAnimation { id:allargamento1 NumberAnimation { target: rect1; property: "width"; duration: 1000 } NumberAnimation { target: rect1; property: "height"; duration: 1000 } NumberAnimation { target: loaderpage1; property: "source"; duration: 1200 } } } ] } }
vorrei sapere nella schermata main dove inserisco questi oggetti, se posso aggiungere (e come fare) PropertyChanges agli Stati che ho definito e quindi un altre NumberAnimation se oltre al ridimensionamento vorrei modificare anche le posizioni x e y di qualcuno di questi oggetti