aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/doc')
-rw-r--r--src/qml/doc/snippets/qml/createQmlObject.qml3
-rw-r--r--src/qml/doc/snippets/qml/integrating-javascript/includejs/script.js3
-rw-r--r--src/qml/doc/src/cppintegration/contextproperties.qdoc3
-rw-r--r--src/qml/doc/src/cppintegration/data.qdoc5
-rw-r--r--src/qml/doc/src/cppintegration/exposecppattributes.qdoc3
-rw-r--r--src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc10
-rw-r--r--src/qml/doc/src/javascript/dynamicobjectcreation.qdoc13
-rw-r--r--src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc2
-rw-r--r--src/qml/doc/src/qmltypereference.qdoc3
9 files changed, 37 insertions, 8 deletions
diff --git a/src/qml/doc/snippets/qml/createQmlObject.qml b/src/qml/doc/snippets/qml/createQmlObject.qml
index a6753823b9..b12c6c2ea5 100644
--- a/src/qml/doc/snippets/qml/createQmlObject.qml
+++ b/src/qml/doc/snippets/qml/createQmlObject.qml
@@ -49,7 +49,8 @@ Rectangle {
function createIt() {
//![0]
var newObject = Qt.createQmlObject('import QtQuick 2.0; Rectangle {color: "red"; width: 20; height: 20}',
- parentItem, "dynamicSnippet1");
+ parentItem,
+ "dynamicSnippet1");
//![0]
//![destroy]
diff --git a/src/qml/doc/snippets/qml/integrating-javascript/includejs/script.js b/src/qml/doc/snippets/qml/integrating-javascript/includejs/script.js
index 0073e4df8f..814e0b444f 100644
--- a/src/qml/doc/snippets/qml/integrating-javascript/includejs/script.js
+++ b/src/qml/doc/snippets/qml/integrating-javascript/includejs/script.js
@@ -42,7 +42,8 @@
Qt.include("factorial.js")
function showCalculations(value) {
- console.log("Call factorial() from script.js:",
+ console.log(
+ "Call factorial() from script.js:",
factorial(value));
}
//![0]
diff --git a/src/qml/doc/src/cppintegration/contextproperties.qdoc b/src/qml/doc/src/cppintegration/contextproperties.qdoc
index 48532ccae2..83f49bdcf0 100644
--- a/src/qml/doc/src/cppintegration/contextproperties.qdoc
+++ b/src/qml/doc/src/cppintegration/contextproperties.qdoc
@@ -65,10 +65,13 @@ QML code invokes a method on the object instance:
\table
\row
+\li C++
\li
\snippet qml/qtbinding/context-advanced/applicationdata.h 0
\codeline
\snippet qml/qtbinding/context-advanced/main.cpp 0
+\row
+\li QML
\li
\snippet qml/qtbinding/context-advanced/MyItem.qml 0
\endtable
diff --git a/src/qml/doc/src/cppintegration/data.qdoc b/src/qml/doc/src/cppintegration/data.qdoc
index a11d8ba510..e153ca3d8b 100644
--- a/src/qml/doc/src/cppintegration/data.qdoc
+++ b/src/qml/doc/src/cppintegration/data.qdoc
@@ -176,7 +176,10 @@ converted to JavaScript array and object values, repectively:
\table
\header
\row
+\li QML
\li \snippet qml/qtbinding/variantlistmap/MyItem.qml 0
+\row
+\li C++
\li \snippet qml/qtbinding/variantlistmap/main.cpp 0
\endtable
@@ -223,7 +226,7 @@ Item {
}
}
\endqml
-
+\row
\li
\code
// C++
diff --git a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
index 0d81930592..e1db5c9d57 100644
--- a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
+++ b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
@@ -395,6 +395,7 @@ methods, as shown below right:
\table
\row
+\li C++
\li
\code
int main(int argc, char *argv[]) {
@@ -409,6 +410,8 @@ methods, as shown below right:
return app.exec();
}
\endcode
+\row
+\li QML
\li
\qml
// MyItem.qml
diff --git a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc
index 25d98dbc0d..2a644cafff 100644
--- a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc
+++ b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc
@@ -170,7 +170,10 @@ QMetaObject::invokeMethod():
\table
\row
+\li QML
\li \snippet qml/qtbinding/functions-qml/MyItem.qml 0
+\row
+\li C++
\li \snippet qml/qtbinding/functions-qml/main.cpp 0
\endtable
@@ -195,6 +198,7 @@ QObject::connect(), so that the \c cppSlot() method is called whenever the
\row
\li
\snippet qml/qtbinding/signals-qml/MyItem.qml 0
+\row
\li
\snippet qml/qtbinding/signals-qml/myclass.h 0
\codeline
@@ -235,8 +239,10 @@ QVariant type:
void cppSlot(const QVariant &v) {
qDebug() << "Called the C++ slot with value:" << v;
- QQuickItem *item = qobject_cast<QQuickItem*>(v.value<QObject*>());
- qDebug() << "Item dimensions:" << item->width() << item->height();
+ QQuickItem *item =
+ qobject_cast<QQuickItem*>(v.value<QObject*>());
+ qDebug() << "Item dimensions:" << item->width()
+ << item->height();
}
};
diff --git a/src/qml/doc/src/javascript/dynamicobjectcreation.qdoc b/src/qml/doc/src/javascript/dynamicobjectcreation.qdoc
index 2988f3a684..acd7188db7 100644
--- a/src/qml/doc/src/javascript/dynamicobjectcreation.qdoc
+++ b/src/qml/doc/src/javascript/dynamicobjectcreation.qdoc
@@ -143,6 +143,15 @@ If the string of QML imports files using relative paths, the path should be
relative to the file in which the parent object (the second argument to the
method) is defined.
+\important When building static QML applications, which is enforced on platforms like iOS,
+QML files are scanned to detect import dependencies. That way, all
+necessary plugins and resources are resolved at compile time.
+However, only explicit import statements are considered (those found at
+the top of a QML file), and not import statements enclosed within string literals.
+To support static builds, you therefore need to ensure that QML files
+using \l{QtQml::Qt::createQmlObject()}{Qt.createQmlObject()},
+explicitly contain all necessary imports at the top of the file in addition
+to inside the string literals.
\section1 Maintaining Dynamically Created Objects
@@ -191,10 +200,10 @@ destroy itself:
\table
\row
\li \c application.qml
-\li \c SelfDestroyingRect.qml
+\li \snippet qml/dynamicObjects-destroy.qml 0
\row
-\li \snippet qml/dynamicObjects-destroy.qml 0
+\li \c SelfDestroyingRect.qml
\li \snippet qml/SelfDestroyingRect.qml 0
\endtable
diff --git a/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc b/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc
index ed73a2b9ba..201cee16e6 100644
--- a/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc
+++ b/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc
@@ -46,7 +46,7 @@ documentation about
A \c qmldir file is a plain-text file that contains
the following commands:
-\table
+\table 70%
\header
\li Syntax
\li Usage
diff --git a/src/qml/doc/src/qmltypereference.qdoc b/src/qml/doc/src/qmltypereference.qdoc
index 48f7ba1bae..31133c862f 100644
--- a/src/qml/doc/src/qmltypereference.qdoc
+++ b/src/qml/doc/src/qmltypereference.qdoc
@@ -208,6 +208,9 @@ Or use the \l{QtQml::Qt::rect()}{Qt.rect()} function:
CustomObject { myRectProperty: Qt.rect(50, 50, 100, 100) }
\endqml
+The \c rect type also exposes read-only \c left, \c right, \c top and \c bottom
+attributes. These are the same as their \l {QRectF}{C++ counterparts}.
+
When integrating with C++, note that any QRect or QRectF value
\l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
converted into a \c rect value, and vice-versa. When a \c rect value is passed to C++, it