我试图在真实的Android设备(三星Galaxy Express)上显示自定义的QML对话框,但无法正常运行,甚至导致应用停止运行。然而,当我在Qt Creator环境中运行应用程序时,一切都正常!Qt Creator上的应用输出如下所示,当应该显示对话框时:
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
我创建的自定义对话框的代码如下:
有什么建议吗?
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
我创建的自定义对话框的代码如下:
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
} ...
有什么建议吗?