Is it mandatory to use a Loader
?
If it's not, you can use a StackView
(of course, having a depth of 1 if you don't want to offer a more complex navigation) and load your components by pushing them on the stack with the replace
option set to true.
That said, you can obtain the result you are asking for as follows:
StackView {
delegate: StackViewDelegate {
function transitionFinished(properties) {
properties.exitItem.x = 0
}
pushTransition: StackViewTransition {
PropertyAnimation {
target: enterItem
property: "x"
from: enterItem.width
to: 0
}
PropertyAnimation {
target: exitItem
property: "x"
from: 0
to: -exitItem.width
}
}
}
}
I apologize if it doesn't work as is (even though it should), but I'm on a mobile phone and I cannot test it right now.