[Interest] what are the requirements for QMetaType::metaObjectForType(QMetaType::type("QQuickLayout*")) to work?
Thiago Macieira
thiago.macieira at intel.com
Fri May 3 18:20:00 CEST 2024
On Friday 3 May 2024 08:51:39 GMT-7 NIkolai Marchenko wrote:
> I am assuming the registration of qquicklayout is deferred somewhere
> but what are the exact timings and conditions?
There's no explicit registration of this type, anywhere in the sources. I
don't even see anything that would be an automatic registration; maybe it gets
put into a QVariant somewhere that my git grep didn't see.
But one of the unit tests assumes it exists, like your code does:
https://code.qt.io/cgit/qt/qtdeclarative.git/tree/tests/auto/qml/
qmlcppcodegen/tst_qmlcppcodegen.cpp#n1646
That means it's relying on some automatic registration somewhere, somehow.
That's poor programming practice.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Principal Engineer - Intel DCAI Cloud Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240503/8a4a4e11/attachment.bin>
More information about the Interest
mailing list