Issues using Qt3D in QWidget on Android
-
I currently have a working Qt application deployable to Desktops and Android which uses QOpenGLWidget for 3D rendering inside a QMainWindow. In a move to simplify the 3D rendering pipeline, I tried to move away from low-level OpenGL rendering to Qt 3D. The switch was pretty smooth for Desktops, but I am having issues when rendering Qt 3D on Android.
Currently, I followed the basicshape c++ example to create a window container (QWidget::createWindowContainer) in order to embed a Qt3dWindow into a QWidget in order to use it in a QStackedWidget. This example is unsupported for Android, which might explains why nothing in rendered. In both my application and basicshape example, nothing is rendered in the QWidget on Android (it works fine on Desktop).
Is there any workaround this issues for Android ?
-
@zhujia, I have not found a solution for windowing a Qt3dWindow into QWidget. I don't know if this is a bug for qt3d but it seems this might be a known issue but a pretty hard one to solve since Android does not have any windowing scheme. Right now, I am using a Qt3dWindow directly without embedding it into a QWidget but overlapping QWidget on top and it works pretty good. I would still very enjoy to be able to embed it in order to reduce the burden of having a complete new application just for Android.
-
@HoTiX "Right now, I am using a Qt3dWindow directly without embedding it into a QWidget but overlapping QWidget on top and it works pretty good. "how to do it ?
can you give some code for me to reference.Because I have done some tests,when the QWidget and Qt3dWindow were used in the same window,the Qt3dwindows always at the bottom layer.