Reputation: 41
I'm trying to display a custom QML dialog on a real Android device (samsung galaxy express) but it is not working and it is also making the app to stop running. However, when I run the app on the Qt creator environment everything works fine!
The app output on Qt creator says something like this when the dialog has to be displayed:
W/Adreno200-EGL(26802): : EGL_BAD_ACCESS E/libEGL (26802): eglMakeCurrent:534 error 3002 (EGL_BAD_ACCESS) W/Qt (26802): eglconvenience/qeglplatformcontext.cpp:128 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3002, this: 0x58aebc90
The code of the custom dialog I made is as follows:
Window {
id: window
visible: true
modality: Qt.ApplicationModal
width: 500
height: 220
flags: Qt.AlignCenter
property Image imgGo1: imgGo1
property Image imgGo2: imgGo2
property Image imgDetectorH: imgDetectorH
property Image imgDetectorV: imgDetectorV
Image {
source: "content/dialog_back.jpg"
width: window.width
height: window.height
} ...
Any suggestions?
Upvotes: 4
Views: 910
Reputation: 3391
According to "Anatomy of a Qt 5 for Android" Qt android does not support multiple activities. It cannot handle multiple surfaces (windows) either. You can use Dialog
or MessageDialog
for displaying a simple dialog. For changing the whole screen and creating a new view. You can use the StackView
which has very nice features that help you to build mobile apps.
Upvotes: 2