[Interest] Qt3D on Android with C++

Laszlo Agocs laszlo.agocs at qt.io
Wed Jun 14 11:48:24 CEST 2017


createWindowContainer() has some minor issues on Android in Qt 5.9 and earlier, which unfortunately lead to not showing anything in the "embedded" window. The missing things have been added in the dev branch, so it should work in 5.10 (although I have only tested QOpenGLWindow/QVulkanWindow, not Qt3DWindow)

Best regards,


From: Interest <interest-bounces+laszlo.agocs=qt.io at qt-project.org> on behalf of max_bergmann89 at web.de <max_bergmann89 at web.de>
Sent: Wednesday, June 14, 2017 11:41:51 AM
To: interest at qt-project.org
Subject: [Interest] Qt3D on Android with C++


I'm currently facing a problem with Qt3D and widgets on Android. My C++ application got a Qt3DWindow in a WindowContainer, so I can use Widgets for controls in this window:

Qt3DExtras::Qt3DWindow *view = new Qt3DExtras::Qt3DWindow();
QWidget *container = QWidget::createWindowContainer(view);
QWidget *widget = new QWidget;
QHBoxLayout *hLayout = new QHBoxLayout(widget);
hLayout->addWidget(container, 1);

(from Basic shapes example)

This approach doesn't work on Android, only the widget with buttons is displayed but not the 3DWindow.
Is there a better way to add control elements to the window that works with Android?
If not, maybe I could use a Scene3D. I've got a QVector of entities (with components) I want to display there. How can I do this? I don't want to change the model, just the view.

Regards Max

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170614/5c0174ee/attachment.html>

More information about the Interest mailing list