Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.13.0
-
None
-
0d4a4a9ef (dev), 14264f82e (6.7), 6907e014f (6.6)
Description
I've got the issue with Qt3DExtras::QText2DEntity not working. But I found the workaround.
Looks like there is a bug? in implementation of Qt3DExtras::QText2DEntity that prevents internal initialization (QText2DEntityPrivate::setScene is never called). This happens when scene is already visible and Qt3DExtras::QText2DEntity is created with parent entity passed to constructor. The workaround I used to make it work is to pass nullptr as a parent in constructor (or no arguments) and call ->setParent(parentEntity) in separate call.
This is not working:
m_text2dLabel = new Qt3DExtras::QText2DEntity(parentNode);
This is working:
m_text2dLabel = new Qt3DExtras::QText2DEntity();
m_text2dLabel->setParent(parentNode);