Unsolved Qt3D QMesh does not emit statusChanged Signal after setting a source
-
Hi all. I am a newbie to Qt3D.
The actual loading part of OBJ file works fine in the main application and I am able to load an OBJ file to the QMesh and shows properly.
I have integrated QtTest project and was trying to test my class which actually loads the OBJ file.
I was trying to use the following code to load a test OBJ file to a QMesh in my QtTest project.
Qt3DRender::QMesh * my_mesh = new Qt3DRender::QMesh(); const QUrl file_url(QStringLiteral("qrc:/assets/quad.obj")); connect(my_mesh, &Qt3DRender::QMesh::statusChanged, [](Qt3DRender::QMesh::Status status) { std::cout << "status=" << status << std::endl; }); my_mesh->setSource(file_url);
The above will be inside the loadRoom() function of my Class which I need to test.
I have also seen that the QMesh emits the signal when the SourceName changes. But not the Status..
Any idea why it didn't work on QtTest class??
-
Hi,
Can you provide a minimal compilable example that shows that behaviour ?
Did you check whether the bug report system already contains something about that ? -
Hi all,
I want to write Tests that rely on a QMesh being loaded, but I never receive Qt3DRender::QMesh::statusChanged nor if I wait it out, it also never gets loaded.
I have made an example to show this behaviour. I tried to keep it minimal. It has two projects, one where I load the QMesh and show it in a Scene3D (that works). The second one loads the QMesh in a QTTest and there is fails to load and emit any signals.https://github.com/Loxodromics/fuzzy-happiness
Does anyone has an idea what is going wrong or how I can test my code that depends on QMesh?
Thank you in advance.
-
Hi,
What version of Qt are you using ?
On what platform ? -
I'm using Qt 5.12.1 on macOS 10.14.3