aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2017-07-11 13:12:42 +0200
committerTopi Reiniƶ <topi.reinio@qt.io>2017-08-29 09:54:48 +0000
commitb4491c46fd9754a1c799978529574037a55a55aa (patch)
tree5e7a3970be9b2b76a7f93c7e1a2f98db7957dce6 /src
parent2baea9d0c3dcaff258b48dec7633105d6294a75e (diff)
Doc: Minor fixes to Loader QML type documentation
- Convert section titles to bookcase - Minimize line length for code snippets that are embedded in tables to prevent overflow. Change-Id: I316fc0fc4c3663397110d1ad1b8b83abce4af02e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quick/doc/snippets/qml/loader/KeyReader.qml2
-rw-r--r--src/quick/doc/snippets/qml/loader/focus.qml7
-rw-r--r--src/quick/items/qquickloader.cpp8
3 files changed, 10 insertions, 7 deletions
diff --git a/src/quick/doc/snippets/qml/loader/KeyReader.qml b/src/quick/doc/snippets/qml/loader/KeyReader.qml
index 41eb208dd0..56604319e0 100644
--- a/src/quick/doc/snippets/qml/loader/KeyReader.qml
+++ b/src/quick/doc/snippets/qml/loader/KeyReader.qml
@@ -43,7 +43,7 @@ Item {
Item {
focus: true
Keys.onPressed: {
- console.log("Loaded item captured:",
+ console.log("KeyReader captured:",
event.text);
event.accepted = true;
}
diff --git a/src/quick/doc/snippets/qml/loader/focus.qml b/src/quick/doc/snippets/qml/loader/focus.qml
index 5634a48ad1..f3509021f1 100644
--- a/src/quick/doc/snippets/qml/loader/focus.qml
+++ b/src/quick/doc/snippets/qml/loader/focus.qml
@@ -49,11 +49,14 @@ Rectangle {
MouseArea {
anchors.fill: parent
- onClicked: loader.source = "KeyReader.qml"
+ onClicked: {
+ loader.source = "KeyReader.qml"
+ }
}
Keys.onPressed: {
- console.log("Captured:", event.text);
+ console.log("Captured:",
+ event.text);
}
}
//![0]
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp
index 2c8f854d4d..9f27beb298 100644
--- a/src/quick/items/qquickloader.cpp
+++ b/src/quick/items/qquickloader.cpp
@@ -185,7 +185,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const
\l sourceComponent to \c undefined destroys the currently loaded object,
freeing resources and leaving the Loader empty.
- \section2 Loader sizing behavior
+ \section2 Loader Sizing Behavior
If the source component is not an Item type, Loader does not
apply any special sizing rules. When used to load visual types,
@@ -217,7 +217,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const
\endtable
- \section2 Receiving signals from loaded objects
+ \section2 Receiving Signals from Loaded Objects
Any signals emitted from the loaded object can be received using the
\l Connections type. For example, the following \c application.qml
@@ -238,7 +238,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const
its parent \l Item.
- \section2 Focus and key events
+ \section2 Focus and Key Events
Loader is a focus scope. Its \l {Item::}{focus} property must be set to
\c true for any of its children to get the \e {active focus}. (See
@@ -266,7 +266,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const
Since \c {QtQuick 2.0}, Loader can also load non-visual components.
- \section2 Using a Loader within a view delegate
+ \section2 Using a Loader within a View Delegate
In some cases you may wish to use a Loader within a view delegate to improve delegate
loading performance. This works well in most cases, but there is one important issue to