aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qml/doc/src/cppintegration/exposecppattributes.qdoc23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
index 52534b4a62..5c53989cbb 100644
--- a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
+++ b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
@@ -91,6 +91,29 @@ For example, below is a \c Message class with an \c author property. As
specified by the Q_PROPERTY macro call, this property is readable through
the \c author() method, and writable through the \c setAuthor() method:
+\note Do not use \e typedef or \e using for Q_PROPERTY types as these
+will confuse moc. This may make certain type comparisons fail.
+
+Instead of:
+
+\badcode
+using FooEnum = Foo::Enum;
+
+class Bar : public QObject {
+ Q_OBJECT
+ Q_PROPERTY(FooEnum enum READ enum WRITE setEnum NOTIFY enumChanged)
+};
+\endcode
+
+Refer to the type directly:
+
+\code
+class Bar : public QObject {
+ Q_OBJECT
+ Q_PROPERTY(Foo::Enum enum READ enum WRITE setEnum NOTIFY enumChanged)
+};
+\endcode
+
\code
class Message : public QObject
{