[Interest] Is it safe to call qRegisterMetaType() before main()?
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Fri Aug 2 16:28:49 CEST 2019
Il 31/07/19 23:22, Nikos Chantziaras ha scritto:
>>
>> static void constructor() __attribute__((constructor));
>> static void constructor(){
>> qmlRegisterType<ClassName>("ClassName", 1, 0, "ClassName");
>> }
>>
>> Maybe it helps.
> Thanks! I didn't know about that one.
You can do that in pure C++, by the way; just define a global object.
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190802/692893d3/attachment.bin>
More information about the Interest
mailing list