I have this main window:
ApplicationWindow {
id : mainWindow
width: 640
height: 480
visible: true
Button{
text: "go back to form 1"
onClicked: {
form2.visible = true;
}
}
SecondForm{
id: form2
}
}
The second window is:
Window{
id: main
width: 640
height: 480
x: 0
y: 0
visible: false;
Button{
text: "go back to form 1"
onClicked: {
main.visible = false;
}
}
}
The desktop version is Ok, But in android when I run the application it's behavior is strange! When I click the button in the mainWindow this error occures: W/Qt ( 8903): (null):0 ((null)): QEGLPlatformContext::swapBuffers(): eglError: 12301, this: 0x6b46e7c0
though it seems that the second form is invoked and the main window become inactive. But the second windows is not visible . Although I can't see the from and button inside, When I touch the area that the button is expected to be located apparently it works and the second window goes away then the first window become active again.
When I try to back to the mainWindow by clicking the android back button it goes back to the mainWindow and this warning: W/Qt ( 8903): (null):0 ((null)): Can't find surface 2
occures!
- Could you possibly tell me how can I force qt to show the second window?
- According to this article, Qt application will only consist of a single activity which can be launched from the Android application. Is that mean that there is no way to have multiple windows? I mean several qml windows with only a single activity.
- If this is the case. Could you please tell me if there is an alternative to develop an application that at least seems to be multiview from the user's perspective?
- What's your opinion about removing all the contents of the application window and replace it with content of the second window? If we add some transition it looks like activity transitions in android. But I'm, worry about performance issues.
Thanks for any help