aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2017-10-18 12:59:36 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2017-11-03 09:36:44 +0000
commitc143c790b7a6fceaac16492023090940c81acc42 (patch)
treedb8c1164153e6ecb0dc59ba1a36787043ee37f2e /src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc
parentee00fa01dc41deaaedfa0d1d5cc6cd750bfe75f4 (diff)
Doc: Move the warning about manipulating QML objects from C++
Manipulating QML objects from C++ is not a best practice when integrating QML and C++, except for testing and prototying. So its apt to warn the reader about such an approach much earlier. Task-number: QTPM-425 Change-Id: Iebb93d099008ff3ebcefe6af25364afe379b7fcf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc')
-rw-r--r--src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc
index 4dc32e3588..7c2ff703c6 100644
--- a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc
+++ b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc
@@ -114,17 +114,7 @@ multiple children with the same \c objectName. In this case,
QObject::findChildren() can be used to find all children with a matching
\c objectName.
-\warning While it is possible to use C++ to access and manipulate QML objects
-deep into the object tree, we recommend that you do not take this approach
-outside of application testing and prototyping. One strength of QML and C++
-integration is the ability to implement the QML user interface separately
-from the C++ logic and dataset backend, and this strategy breaks if the C++
-side reaches deep into the QML components to manipulate them directly. This
-would make it difficult to, for example, swap a QML view component for
-another view, if the new component was missing a required \c objectName. It
-is better for the C++ implementation to know as little as possible about the
-QML user interface implementation and the composition of the QML object tree.
-
+\include warning.qdocinc
\section1 Accessing Members of a QML Object Type from C++