From bd0f3345a938b35ce6a12f6150373b0955b8dd12 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 10 Jul 2011 15:24:15 -0500 Subject: Add Qt3 development HEAD version --- doc/html/metaobjects.html | 93 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 doc/html/metaobjects.html (limited to 'doc/html/metaobjects.html') diff --git a/doc/html/metaobjects.html b/doc/html/metaobjects.html new file mode 100644 index 0000000..b42f5bb --- /dev/null +++ b/doc/html/metaobjects.html @@ -0,0 +1,93 @@ + + + + + +Meta Object System + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Meta Object System

+ + + +

+

Qt's Meta Object System provides the signals and slots mechanism for +inter-object communication, runtime type information, and the dynamic +property system. +

The Meta Object System is based on three things: +

    +
  1. the QObject class; +
  2. the Q_OBJECT macro inside the private section of the class +declaration; +
  3. the Meta Object Compiler (moc). +
+

The moc reads a C++ source file. If it finds one or more class +declarations that contain the Q_OBJECT macro, it produces another C++ +source file which contains the meta object code for the classes that +contain the Q_OBJECT macro. This generated source file is either +#included into the class's source file or compiled and linked with the +class's implementation. +

In addition to providing the signals and +slots mechanism for communication between objects (the main +reason for introducing the system), the meta object code provides +additional features in QObject: +

+

While it is possible to use QObject as a base class without the +Q_OBJECT macro and without meta object code, neither signals and slots +nor the other features described here will be available if the +Q_OBJECT macro is not used. From the meta object system's point of +view, a QObject subclass without meta code is equivalent to its +closest ancestor with meta object code. This means for example, that +className() will not return the actual name of your class, but the +class name of this ancestor. We strongly recommend that all +subclasses of QObject use the Q_OBJECT macro regardless of whether +they actually use signals, slots and properties or not. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
Qt 3.3.8
+
+ -- cgit v1.2.1