diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/deployment/qt-conf.qdoc | 2 | ||||
-rw-r--r-- | doc/src/examples/moveblocks.qdoc | 6 | ||||
-rw-r--r-- | doc/src/objectmodel/properties.qdoc | 19 | ||||
-rw-r--r-- | doc/src/snippets/code/doc_src_properties.qdoc | 2 |
4 files changed, 16 insertions, 13 deletions
diff --git a/doc/src/deployment/qt-conf.qdoc b/doc/src/deployment/qt-conf.qdoc index 4357c88..b195889 100644 --- a/doc/src/deployment/qt-conf.qdoc +++ b/doc/src/deployment/qt-conf.qdoc @@ -128,7 +128,7 @@ \list \o 4.0.1 matches \c Paths/4 \o 4.1.5 matches \c Paths/4.1 - \o 4.6.3 matches \c Paths/4.2.5 + \o 4.6.3 matches \c Paths/4.2.5 (because 4.2.5 is the latest version with the same major version number) \o 5.0.0 matches \c Paths \o 6.0.2 matches \c Paths/6 \endlist diff --git a/doc/src/examples/moveblocks.qdoc b/doc/src/examples/moveblocks.qdoc index 2d0787a..f3e8ce5 100644 --- a/doc/src/examples/moveblocks.qdoc +++ b/doc/src/examples/moveblocks.qdoc @@ -60,7 +60,7 @@ states. \o \c StateSwitchTransition is a custom transition that triggers on \c{StateSwitchEvent}s. - \o \c StateSwitchEvent is a QEvent that trigger \c{StateSwitchTransition}s. + \o \c StateSwitchEvent is a QEvent that triggers \c{StateSwitchTransition}s. \o \c QGraphicsRectWidget is a QGraphicsWidget that simply paints its background in a solid \l{Qt::}{blue} color. \endlist @@ -141,7 +141,7 @@ Finally, we can create the state machine, add our initial state, and start execution of the state graph. - \section2 The \c createGemetryState() Function + \section2 The \c createGeometryState() Function In \c createGeometryState(), we set up the geometry for each graphics item. @@ -155,7 +155,7 @@ \section1 The StateSwitcher Class \c StateSwitcher has state switch transitions to each \l{QState}s - we created with \c createGemetryState(). Its job is to transition + we created with \c createGeometryState(). Its job is to transition to one of these states at random when it is entered. All functions in \c StateSwitcher are inlined. We'll step through diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc index 076c544..a807caf 100644 --- a/doc/src/objectmodel/properties.qdoc +++ b/doc/src/objectmodel/properties.qdoc @@ -208,17 +208,20 @@ the property type. The meta-object compiler enforces these requirements. - Given a pointer to an instance of MyClass or a pointer to an - instance of QObject that happens to be an instance of MyClass, we - have two ways to set its priority property. + Given a pointer to an instance of MyClass or a pointer to a + QObject that is an instance of MyClass, we have two ways to set + its priority property: \snippet doc/src/snippets/code/doc_src_properties.qdoc 6 - In the example, the enumeration type used for the property type - was locally declared in MyClass. Had it been declared in another - class, its fully qualified name (i.e., OtherClass::Priority) would - be required. In addition, that other class must also inherit - QObject and register the enum type using Q_ENUMS(). + In the example, the enumeration type that is the property type is + declared in MyClass and registered with the \l{Meta-Object System} + using the Q_ENUMS() macro. This makes the enumeration values + available as strings for use as in the call to setProperty(). Had + the enumeration type been declared in another class, its fully + qualified name (i.e., OtherClass::Priority) would be required, and + that other class would also have to inherit QObject and register + the enumeration type there using the Q_ENUMS() macro. A similar macro, Q_FLAGS(), is also available. Like Q_ENUMS(), it registers an enumeration type, but it marks the type as being a diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.qdoc index 38cc139..962d930 100644 --- a/doc/src/snippets/code/doc_src_properties.qdoc +++ b/doc/src/snippets/code/doc_src_properties.qdoc @@ -112,7 +112,7 @@ MyClass *myinstance = new MyClass; QObject *object = myinstance; myinstance->setPriority(MyClass::VeryHigh); -object->setProperty("priority", (int)MyClass::VeryHigh); +object->setProperty("priority", "VeryHigh"); //! [6] |