So on a button click, one popup shows and that popup has one button , on button click i have to redirect to another page. But when I click on that button the next page is not showing properly(its like half of current page and half of next page) and then app stops responding.
here is the code sample
Page{
background: Rectangle {
id: page1
width: parent.width
height: 750
color: "#333333"
}
Button{
id:btn
text: qsTr("NEXT PAGE")
height: 48
Layout.preferredWidth: 290
anchors.centerIn: parent
onClicked: {
popup.open();
}
}
Popup {
visible: false
id: popup
background: Rectangle {
implicitWidth: 300
implicitHeight: 200
color: "#ffffff"
}
Button {
id: signin_btn
text: qsTr("SIGN IN")
onClicked:
{
popup.close();
stackView.push("next.qml");
}
}
}
}
next.qmlRectangle{
id:rect
height: 750
width: 300
color: "#666666"
}
I don't see you have StackView in the page. This is the doc on the StackView https://doc.qt.io/qt-5/qml-qtquick-controls2-stackview.html from QML, you can have Page or App in AppStudio in lieu of ApplicationWindow in that example.
Thank you,
Erwin
@ErwinSoekianto Hi, on MyApp.qml page i have used StackView, i didn't mentioned that here. Can you suggest me something
@x_d,
I don't see you have StackView component on the page. See this doc on StackView from QML, https://doc.qt.io/qt-5/qml-qtquick-controls2-stackview.html You can replace ApplicationWindow with App or Page for the AppStudio app from that sample.
Thank you,
Erwin