On terça-feira, 1 de março de 2016 17:06:49 PST André Somers wrote: > > The meta *object* system has no registration. > > > > The meta *type* system requires that the registered type be default- > > constructible and copyable, but QObject is not copyable. Therefore, > > QObject- derived classes cannot be registered with the meta type system. > > Am I completely misinterpretting the documentation then? > http://doc.qt.io/qt-5/qmetatype.html#metaObject > > If I read that correctly, you can register a > pointer-to-a-QObject-derived-class-instance and use that. So, indeed, > you do not register the type, but the type*. And that has no problems > with being default constructed or copied.
Correct. You can't register a QObject class with the meta type system, but you can register a pointer to a QObject class. The problem is that QMetaType::create() will then create a pointer, not the object. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest