Il 16/07/20 12:43, Volker Hilsheimer ha scritto:
For pre-C++20 (where it’s possible to have zero-size structs), and for compilers that don’t respect the [[no_unqiue_address]] attribute, all these struct-instances are put into a union. In that case, a class using QProperty will be larger (by the same amount no matter the number of properties) than the same class in Qt 5. With C+++ 20 and compilers that do respect [[no_unique_address]], the size and layout of these classes will be the same.
Could anyone please illustrate with some code snippets how to achieve this, in practice, in a number of use cases? E.g. client code (non pimpled QObject subclass), (Qt) library code (pimpled QObject subclass), etc.; gadgets (does QProperty work there?); with and without other Q_PROPERTY/QProperty already present, etc.
Thanks, -- Giuseppe D'Angelo | giuseppe.dang...@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
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development