Documentation: Add examples for Q_NAMESPACE(_EXPORT)

It is not obvious how to use them.

Change-Id: I60fdfb95f4c29cbc310d149495ebb38964e5a9ac
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
Friedemann Kleint 2020-04-02 10:17:43 +02:00
parent e0a78bf450
commit 65636ed060

View File

@ -4614,6 +4614,14 @@ QDebug operator<<(QDebug dbg, const QObject *o)
\c{staticMetaObject} is of type QMetaObject and provides access to the
enums declared with Q_ENUM_NS/Q_FLAG_NS.
For example:
\code
namespace test {
Q_NAMESPACE
...
\endcode
\sa Q_NAMESPACE_EXPORT
*/
@ -4630,6 +4638,14 @@ QDebug operator<<(QDebug dbg, const QObject *o)
is declared with the supplied \a EXPORT_MACRO qualifier. This is
useful if the object needs to be exported from a dynamic library.
For example:
\code
namespace test {
Q_NAMESPACE_EXPORT(EXPORT_MACRO)
...
\endcode
\sa Q_NAMESPACE, {Creating Shared Libraries}
*/