QObjectderived
QObject-derived refers to a class that inherits from QObject, the fundamental base class in the Qt framework. In Qt, QObject provides core object-model features that are widely used beyond user interfaces, including a parent-child hierarchy for automatic memory management, an event system, and the signals-and-slots mechanism for inter-object communication. A QObject-derived class can participate in Qt’s meta-object system, enabling runtime type information, dynamic properties, and introspection through the QMetaObject.
To enable signals, slots, and properties, a QObject-derived class must include the Q_OBJECT macro in its declaration.
When designing a QObject-derived class, consider ownership and threading. QObject instances can own child objects via
QObject-derived classes are common in both GUI and non-GUI Qt code and are often exposed to QML