Getting this error message when running my QML application on Android. It's working fine in qmlscene
, though.
Code looks like this:
main.qml:
ApplicationWindow {
property Component loaderPage: LoaderPage {
onGotoPage: changePage(page)
}
property Component loginPage: LoginPage {
onGotoPage: changePage(page)
}
function changePage(page) {
switch (page) {
case "login":
stackView.push({item: loginPage});
break;
default:
print("panic!")
}
}
StackView {
id: stackView
initialItem: loaderPage
}
}
Page.qml:
Item {
signal gotoPage (string page)
}
LoaderPage.qml:
Page {
id: loaderPage
// Triggered by some event:
function() {
loaderPage.gotoPage("login");
}
}
Can anyone explain why it's complaining about a recursive call?
I'm working with QtQuick 2.3
and QtQuick.Controls 1.2
.
this error still persists in
QtQuick.Controls 2.2
lower, moving to 2.5 and higher should resolve it.