QML SwipeView Signals
Unsolved
QML and Qt Quick
-
Hi, is there any signal I can connect to when a SwipeView Page gets loaded?
SwipeView { // this doesn't work // onChanged: { console.log('page changed'); } Page { // this doesn't work // onLoaded: { console.log('page loaded'); } } Page { } Page { } }
-
Hi! You can use
onCurrentIndexChanged
:SwipeView { id: view anchors.fill: parent currentIndex: 1 onCurrentIndexChanged: console.log(currentIndex) Rectangle { color: "red" width: 300 height: 400 } Rectangle { color: "green" width: 300 height: 400 } Rectangle { color: "blue" width: 300 height: 400 } }
-
@Wieland Thankyou, that works. It seems that signal is missing from the documentation that comes with QtCreator.