[QT3D] QML/C++ mix
Unsolved
General and Desktop
-
I got a C++ Qt3D-application which is similar to the basic shapes example. The problem is, that the only approach to add widgets to the Qt3D-window seems to be via QWidget::createWindowContainer (correct me if I'm wrong), for example, adding a button to Qt3DWindow:
Qt3DExtras::Qt3DWindow *view = new Qt3DExtras::Qt3DWindow(); QWidget *container = QWidget::createWindowContainer(view); QWidget *widget = new QWidget; QHBoxLayout *hLayout = new QHBoxLayout(widget); hLayout->addWidget(container, 1) QPushButton* button = new QPushButton; button->setText("Hello World"); hLayout->addWidget(button)
The problem is that this approach causes problems with Android devices, so I would like to set up the 3DWindow and UI-Elements with QML but leave all the other stuff, like creating Entities, in C++. How would I do this?
Edit: This old topic describes what I want to do, but it is unanswered