QML中特效实现方法

Fishing_Cat_:

QQmlApplicationEngine engine;

MyCustomClass myObj;

engine.rootContext()->setContextProperty("myExposedObject", &myObj);

事实上我i这样写碰见了一个问题,就是我在qml中Text { text: myExposedObject.someProperty }会提示someProperty为null

当我使用QQmlApplicationEngine engine;

MyCustomClass* myObj = new MyCustomClass();

engine.rootContext()->setContextProperty("myExposedObject", myObj);时,就没有问题,请问是什么原因

方舟生存进化翼龙鞍几级解锁 翼龙鞍多少级解锁|包含“蹄”字的成语有哪些