diff options
Diffstat (limited to 'examples/qml/doc/src/qml-extending.qdoc')
-rw-r--r-- | examples/qml/doc/src/qml-extending.qdoc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/qml/doc/src/qml-extending.qdoc b/examples/qml/doc/src/qml-extending.qdoc index e56dd90dd7..64d7235031 100644 --- a/examples/qml/doc/src/qml-extending.qdoc +++ b/examples/qml/doc/src/qml-extending.qdoc @@ -178,12 +178,14 @@ previous example. However, as we have repurposed the People class as a common base for Boy and Girl, we want to prevent it from being instantiated from QML directly - an explicit Boy or Girl should be instantiated instead. -\snippet referenceexamples/coercion/main.cpp 0 +\snippet referenceexamples/coercion/person.h 0 While we want to disallow instantiating Person from within QML, it still needs to be registered with the QML engine, so that it can be used as a property type and other types can be coerced to it. +\snippet referenceexamples/coercion/main.cpp 0 + \section2 Define Boy and Girl The implementation of Boy and Girl is trivial. |