But is it now working otherwise? You can access the geometry() without a crash? If so, then I wouldn't worry about the confusing error.
d_stranz Today, 16:35I have another model called "monster.ply". Changing the name in the setSource() method caused the other model to be loaded and I always get the same error
franco.amato Yesterday, 22:09Weird. Don't know. Possibly the mesh hasn't finished (or even started) loading yet since there is no delay between the setSource() and status() calls.
Maybe the mesh needs to have a name...
I changed the code to:
QUrl data = QUrl::fromLocalFile("statue.ply");
Qt3DRender::QMesh *bodyMesh = new Qt3DRender::QMesh();
bodyMesh->setMeshName("bodyMesh");
bodyMesh->setSource(data);
And what do you get as a Status if you call mesh->status() after assigning the source URL?
And once you see that it is returning Error, then think about why QUrl (and your runtime environment)...
Qt Centre is a community site devoted to programming in C++ using the Qt framework developed at Digia.
If you have any problems with Qt or its usage, you can get help from the members of Qt community on our forum.
Don't forget to check out our links section for more Qt resources.
Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code.
Rendering a QQuickItem into a QImage (Qt6)
15th March 2023 23:19 by Bilbon