[Interest] Creating a QVariant of QList<QObject*> knowing only the class name
Thiago Macieira
thiago.macieira at intel.com
Wed Feb 22 19:32:46 CET 2017
On quarta-feira, 22 de fevereiro de 2017 08:42:13 PST Thiago Macieira wrote:
> The point of the metatype system is to like std::any. It is a simple way of
> registering functions to register in a central database a set of functions
> to manipulate types.
That's what you get for answering emails before first coffee.
"The purpose of the metatype system is like std::any's. It is a simple way of
registering in a central database a set of functions to manipulate types."
It extracts these operations:
static void *create(int type, const void *copy = Q_NULLPTR);
static void destroy(int type, void *data);
static void *construct(int type, void *where, const void *copy);
static void destruct(int type, void *where);
static bool save(QDataStream &stream, int type, const void *data);
static bool load(QDataStream &stream, int type, void *data);
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list