Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QMetaClassInfo Class Reference

\inmodule QtCore More...

#include <qmetaobject.h>

+ Collaboration diagram for QMetaClassInfo:

Public Member Functions

constexpr QMetaClassInfo ()
 
const char * name () const
 Returns the name of this item.
 
const char * value () const
 Returns the value of this item.
 
const QMetaObjectenclosingMetaObject () const
 

Friends

struct QMetaObject
 

Detailed Description

\inmodule QtCore

The QMetaClassInfo class provides additional information about a class.

Class information items are simple {name}–{value} pairs that are specified using Q_CLASSINFO() in the source code. The information can be retrieved using name() and value(). For example:

class MyClass
{
Q_CLASSINFO("author", "Sabrina Schweinsteiger")
Q_CLASSINFO("url", "http://doc.moosesoft.co.uk/1.0/")
public:
...
};

This mechanism is free for you to use in your Qt applications.

Note
It's also used by the \l[ActiveQt]{Active Qt}, \l[QtDBus]{Qt D-Bus}, \l[QtQml]{Qt Qml}, and \l{Qt Remote Objects} modules. Some keys might be set when using these modules.
See also
QMetaObject

Definition at line 413 of file qmetaobject.h.

Constructor & Destructor Documentation

◆ QMetaClassInfo()

QMetaClassInfo::QMetaClassInfo ( )
inlineconstexpr

Definition at line 416 of file qmetaobject.h.

Member Function Documentation

◆ enclosingMetaObject()

const QMetaObject * QMetaClassInfo::enclosingMetaObject ( ) const
inline

Definition at line 419 of file qmetaobject.h.

◆ name()

const char * QMetaClassInfo::name ( ) const

Returns the name of this item.

See also
value()

Definition at line 4176 of file qmetaobject.cpp.

References rawStringData().

+ Here is the call graph for this function:

◆ value()

const char * QMetaClassInfo::value ( ) const

Returns the value of this item.

See also
name()

Definition at line 4188 of file qmetaobject.cpp.

References rawStringData().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QMetaObject

friend struct QMetaObject
friend

Definition at line 433 of file qmetaobject.h.


The documentation for this class was generated from the following files: