September 2011
Intermediate to advanced
768 pages
15h 18m
English
QObject is the base class for many of the important classes in the Qt library, such as QEvent, QApplication, QLayout, and QWidget. We refer to any object of a class publicly derived from QObject as a QObject. A QObject can have a parent and children, providing another implementation of the Composite pattern. It can use signals and slots, an implementation of the Observer pattern, to communicate with other QObjects. QObjects make it possible to do event-based programming, which employs QApplication and Qt’s event loop.
Following is an abbreviated look at its definition.
class QObject { public: explicit QObject(QObject* parent=0); QObject * parent () const; QString objectName() const; ...