diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 7f7f4da5d0a..12e38db8148 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4654,6 +4654,13 @@ QDebug operator<<(QDebug dbg, const QObject *o) Q_GADGET or Q_GADGET_EXPORT instead of Q_OBJECT to enable the meta object system's support for enums in a class that is not a QObject subclass. +//! [qobject-macros-private-access-specifier] + \note This macro expansion ends with a \c private: access specifier, which makes member + declarations immediately after the macro private, too. If you want add public (or protected) + members immediately after the macro, you need to use a \c public: (or \c protected:) + access specifier. +//! [qobject-macros-private-access-specifier] + \sa {Meta-Object System}, {Signals and Slots}, {Qt's Property System} */ @@ -4673,6 +4680,8 @@ QDebug operator<<(QDebug dbg, const QObject *o) \c{staticMetaObject} is of type QMetaObject and provides access to the enums declared with Q_ENUM. + \include qobject.cpp qobject-macros-private-access-specifier + \sa Q_GADGET_EXPORT */ @@ -4698,6 +4707,8 @@ QDebug operator<<(QDebug dbg, const QObject *o) ~~~ \endcode + \include qobject.cpp qobject-macros-private-access-specifier + \sa Q_GADGET, {Creating Shared Libraries} */