summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobject.cpp
diff options
context:
space:
mode:
authorartoka <arto.katajasalo@digia.com>2011-12-13 14:20:30 +0200
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 12:25:07 +0200
commit08e5e81d5ebece3eb3f489d438e2cea5d4adcb4f (patch)
treec775ae5728609a44a2ea2b579a2fb891189f7c4e /src/corelib/kernel/qmetaobject.cpp
parentb10d3383b8dcfafae5adad2f373cc986cc3e66cf (diff)
Various qt documentation fixes (wk 43)
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
-rw-r--r--src/corelib/kernel/qmetaobject.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 71f375f510..8e6f14eaf9 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -1337,7 +1337,30 @@ const char *QMetaMethod::typeName() const
Returns the tag associated with this method.
Tags are special macros recognized by \c moc that make it
- possible to add extra information about a method. For the moment,
+ possible to add extra information about a method.
+
+ Tag information can be added in the following
+ way in the function declaration:
+
+ \code
+ #define THISISTESTTAG // tag text
+ ...
+ private slots:
+ THISISTESTTAG void testFunc();
+ \endcode
+
+ and the information can be accessed by using:
+
+ \code
+ MainWindow win;
+ win.show();
+
+ int functionIndex = win.metaObject()->indexOfSlot("testFunc()");
+ QMetaMethod mm = metaObject()->method(functionIndex);
+ qDebug() << mm.tag(); // prints THISISTESTTAG
+ \endcode
+
+ For the moment,
\c moc doesn't support any special tags.
*/
const char *QMetaMethod::tag() const