Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Using qtqucik and qml in a qt widget based ui



  • I had a qt android application that currently uses a widget ui and want to use qtquick to use qml to make a new ui. To do this I used the following code
    @ QQuickView *view = new QQuickView();
    QWidget *container = QWidget::createWindowContainer(view, this);
    container->setMinimumSize(200, 200);
    container->setMaximumSize(200, 200);
    container->setFocusPolicy(Qt::TabFocus);
    view->setSource(QUrl("/path/to/qmlfile/main.qml"));
    QLayout *layout = this->layout();
    layout->addWidget(container);@
    I keep getting a segmentation fault because of this code later on in my program.
    I get this error "E/libEGL ( 8107): eglMakeCurrent:534 error 3002 (EGL_BAD_ACCESS)" and then it crashes with the segfault.


  • Moderators

    Hi,

    It looks like createWindowContainer() is currently not supported on Android. See the last comment at http://www.ics.com/blog/combining-qt-widgets-and-qml-qwidgetcreatewindowcontainer



  • @JKSH Thank you for the reply!


Log in to reply