Logo Search packages:      
Sourcecode: qt4-x11 version File versions

QObjectList [related, inherited]

Q_CLASSINFO(Name, Value)

This macro associates extra information to the class, which is available using QObject::metaObject(). Except for the ActiveQt extension, Qt doesn't use this information.

The extra information takes the form of a Name string and a Value literal string.

Example:

doc/src/snippets/code/src.corelib.kernel.qobject.cpp 35

See also:
QMetaObject::classInfo()
Q_INTERFACES(...)

This macro tells Qt which interfaces the class implements. This is used when implementing plugins.

Example:

examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h 1 examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h 3

See the {tools/plugandpaintplugins/basictools}{Plug & Paint Basic Tools} example for details.

See also:
Q_DECLARE_INTERFACE(), Q_EXPORT_PLUGIN2(), {How to Create Qt Plugins}
Q_PROPERTY(...)

This macro is used for declaring properties in classes that inherit QObject. Properties behave like class data members, but they have additional features accessible through the {Meta-Object System}.

doc/src/snippets/code/src.corelib.kernel.qobject.cpp 36

The property name and type and the READ function are required. The type can be any type supported by QVariant, or it can be a user-defined type. The other items are optional, but a WRITE function is common. The attributes default to true except USER, which defaults to false.

For example:

doc/src/snippets/code/src.corelib.kernel.qobject.cpp 37

For more details about how to use this macro, and a more detailed example of its use, see the discussion on {Qt's Property System}.

See also:
{Qt's Property System}
Q_ENUMS(...)

This macro registers one or several enum types to the meta-object system.

For example:

doc/src/snippets/code/src.corelib.kernel.qobject.cpp 38

If you want to register an enum that is declared in another class, the enum must be fully qualified with the name of the class defining it. In addition, the class defining the enum has to inherit QObject as well as declare the enum using Q_ENUMS().

See also:
{Qt's Property System}
Q_FLAGS(...)

This macro registers one or several "flags" types to the meta-object system.

Example:

doc/src/snippets/code/src.corelib.kernel.qobject.cpp 39

See also:
{Qt's Property System}
Q_OBJECT

The Q_OBJECT macro must appear in the private section of a class definition that declares its own signals and slots or that uses other services provided by Qt's meta-object system.

For example:

doc/src/snippets/signalsandslots/signalsandslots.h 1 doc/src/snippets/signalsandslots/signalsandslots.h 2 doc/src/snippets/signalsandslots/signalsandslots.h 3

See also:
{Meta-Object System}, {Signals and Slots}, {Qt's Property System}
Synonym for QList<QObject *>.


Generated by  Doxygen 1.6.0   Back to index