Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Is it possible to integrate QML code to QtWidgets-based app on Android???
Forum Updated to NodeBB v4.3 + New Features

Is it possible to integrate QML code to QtWidgets-based app on Android???

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 851 Views 1 Watching
  • 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.
  • R Offline
    R Offline
    rom8726
    wrote on last edited by
    #1

    I want to insert QML-view into MainWindow. For desktop build it works fine, but under Android I got error.
    Code:
    [code]
    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);

    QQuickView *view = new QQuickView();
    
    QWidget *container = QWidget::createWindowContainer(view, this);
    container->setMinimumSize(350, 500);
    container->setMaximumSize(350, 500);
    container->setFocusPolicy(Qt::TabFocus);
    QUrl qmlUrl("qrc:/main.qml");
    view->setSource(qmlUrl);
    container->move(10,20);
    

    }
    [/code]

    Error:
    [code]
    02-10 05:53:43.345: A/libc(1722): Fatal signal 11 (SIGSEGV) at 0x00000408 (code=1), thread 1749 (QSGRenderThread)
    02-10 05:53:43.475: I/DEBUG(48): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    02-10 05:53:43.475: I/DEBUG(48): Build fingerprint: 'generic/sdk/generic:4.4/KRT16L/892118:eng/test-keys'
    02-10 05:53:43.475: I/DEBUG(48): Revision: '0'
    02-10 05:53:43.475: I/DEBUG(48): pid: 1722, tid: 1749, name: QSGRenderThread >>> org.qtproject.example.QmlViewToQtWidgetProject <<<
    02-10 05:53:43.485: I/DEBUG(48): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000408
    02-10 05:53:43.865: I/DEBUG(48): backtrace:
    02-10 05:53:43.865: I/DEBUG(48): #00 pc 00005d54 /system/lib/libGLESv2.so (glGetString+32)
    02-10 05:53:43.865: I/DEBUG(48): #01 pc 000163ff /data/data/org.qtproject.example.QmlViewToQtWidgetProject/plugins/platforms/android/libqtforandroidGL.so
    02-10 05:53:43.865: I/DEBUG(48): #02 pc 000a348d /data/app-lib/org.qtproject.example.QmlViewToQtWidgetProject-1/libQt5Gui.so (QOpenGLContext::makeCurrent(QSurface*)+224)
    02-10 05:53:43.865: I/DEBUG(48): #03 pc 000b29db /data/app-lib/org.qtproject.example.QmlViewToQtWidgetProject-1/libQt5Quick.so
    02-10 05:53:43.865: I/DEBUG(48): #04 pc 0006a9c1 /data/app-lib/org.qtproject.example.QmlViewToQtWidgetProject-1/libQt5Core.so
    [/code]

    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