Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QML not showing in Qt Widgets app on Android

QML not showing in Qt Widgets app on Android

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nayar
    wrote on last edited by
    #1

    I included some QML inside my Qt app like this:-

    @QQuickView *mixtureinfoview = new QQuickView;
    mixtureinfoview->rootContext()->setContextProperty("m", m);
    mixtureinfoview->setSource(QUrl("qrc:/qml/mixtureinfo.qml"));

    QWidget *mixtureinfowidget = QWidget::createWindowContainer(mixtureinfoview);
    ui->verticalLayout_mixtureinfo->addWidget(mixtureinfowidget);@
    

    On my desktop it works fine. But the QML doesn't display on my android. Whenever i Qt tries to load the QMLs, the following messages appear in the debug window

    @E/libEGL (29636): eglMakeCurrent:540 error 3002 (EGL_BAD_ACCESS)
    W/Qt (29636): eglconvenience/qeglplatformcontext.cpp:119 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3002, this: 0x67441850
    W/Qt (29636):
    E/libEGL (29636): eglMakeCurrent:540 error 3002 (EGL_BAD_ACCESS)
    W/Qt (29636): eglconvenience/qeglplatformcontext.cpp:119 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3002, this: 0x67441850 @

    Any idea? All the other Qt Creator examples work in the tablet tho.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchiasson
      wrote on last edited by
      #2

      I'm getting something similar when I use a regular QWindow as the parent of the QuickView on Android 4.3 using Qt 5.2.1

      @
      QWindow window;
      window.show();

      QQuickView view;
      view.setSource(QUrl("qrc:/fps.qml"));
      view.setParent(&window);
      view.show();
      

      @

      And here is what I got:

      @
      E/libEGL (28532): eglMakeCurrent:671 error 3009 (EGL_BAD_MATCH)
      W/Qt (28532): eglconvenience/qeglplatformcontext.cpp:128 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x5964dbc0
      W/Qt (28532):
      E/libEGL (28532): eglMakeCurrent:671 error 3009 (EGL_BAD_MATCH)
      W/Qt (28532): eglconvenience/qeglplatformcontext.cpp:128 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x5964dbc0
      W/Qt (28532):
      E/libEGL (28532): eglMakeCurrent:671 error 3009 (EGL_BAD_MATCH)
      W/Qt (28532): eglconvenience/qeglplatformcontext.cpp:128 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x5964dbc0
      W/Qt (28532):
      E/libEGL (28532): eglMakeCurrent:671 error 3009 (EGL_BAD_MATCH)
      W/Qt (28532): eglconvenience/qeglplatformcontext.cpp:128 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x5964dbc0
      W/Qt (28532):
      @

      This is really inconvenient because I did all my openGL rendering work in a QWindow subclass and I was hoping to be able to draw some QML on top of it.

      The same code works fine on Ubuntu 14.04, minus a transparency issue with QML.

      Here is my conclusion: If you want to make a 3D game and use QML to make your HUD, you are out of luck.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved