A bit of context: Qt 5.15, since by default qquicklayout is an internal qt type but we need to have a custom intermediary attached Layout type, I am using code like this:
auto metaObject = QMetaType::metaObjectForType(QMetaType::type("QQuickLayout*")); const auto func = qmlAttachedPropertiesFunction(parent, metaObject); m_attachedProperties.object = qmlAttachedPropertiesObject(parent, func, true); // below are registrations of custom bindings this works fine in our actual application but for whatever reason when qml tests are being run the line QMetaType::metaObjectForType(QMetaType::type("QQuickLayout*")); returns nullptr in the constructor of a type that has a custom attached layout. it also returns nullptr in qmlEngineAvailable of the test's setup class. I am assuming the registration of qquicklayout is deferred somewhere but what are the exact timings and conditions?
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest