aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2021-06-10 08:31:51 +0200
committerTopi Reinio <topi.reinio@qt.io>2021-08-26 11:33:04 +0200
commit42dccb812f49ee42ac51135b3f563e5f9c94ccac (patch)
tree6b181a7d589fb8cb1d12f3aed7e62095ffcc1069
parentb655bb28ef7e7175f558fef0c4275273180fa2aa (diff)
doc: move the SelectionRectangle snippet to correct the place
After the cmake changes that restructured the repository, the snippets are now located in a different place. Update the documentation for SelectionRectangle to reflect this, and correct some related documentation issues at the same time. Change-Id: I4860973bf101dc6c2dce5f64822235f0b5b73ce6 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit de66c7e6c4ae03d1da2225dc443a028bf5f6e722) Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--src/quickcontrols2/doc/snippets/qtquickcontrols2-selectionrectangle.qml (renamed from src/quickcontrols2/doc/snippets/selectionrectangle.qml)8
-rw-r--r--src/quicktemplates2/qquickselectionrectangle.cpp6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/quickcontrols2/doc/snippets/selectionrectangle.qml b/src/quickcontrols2/doc/snippets/qtquickcontrols2-selectionrectangle.qml
index 02ee9e9058..c866832432 100644
--- a/src/quickcontrols2/doc/snippets/selectionrectangle.qml
+++ b/src/quickcontrols2/doc/snippets/qtquickcontrols2-selectionrectangle.qml
@@ -80,16 +80,16 @@ Window {
delegate: Rectangle {
implicitWidth: 100
implicitHeight: 30
- color: selected ? "green" : "lightgray"
+ color: selected ? "blue" : "lightgray"
required property bool selected
Text { text: display }
}
+ }
- SelectionRectangle {
- target: tableView
- }
+ SelectionRectangle {
+ target: tableView
}
//![0]
}
diff --git a/src/quicktemplates2/qquickselectionrectangle.cpp b/src/quicktemplates2/qquickselectionrectangle.cpp
index 204e98a450..9678c6cfe5 100644
--- a/src/quicktemplates2/qquickselectionrectangle.cpp
+++ b/src/quicktemplates2/qquickselectionrectangle.cpp
@@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
The following example shows how you can make a SelectionRectangle target
a TableView:
- \snippet qml/tableview/selectionmodel.qml 0
+ \snippet qtquickcontrols2-selectionrectangle.qml 0
\note A SelectionRectangle itself is not shown as part of a selection. Only the
delegates (like topLeftHandle and bottomRightHandle) are used.
@@ -109,7 +109,7 @@ QT_BEGIN_NAMESPACE
top-left corner of the selection rectangle. When a handle is
provided, the user can drag it to adjust the selection.
- You can set this property to \c null if you don't want a top-left selection handle.
+ Set this property to \c null if you don't want a selection handle on the top-left.
\sa bottomRightHandle
*/
@@ -121,7 +121,7 @@ QT_BEGIN_NAMESPACE
top-left corner of the selection rectangle. When a handle is
provided, the user can drag it to adjust the selection.
- You can set this property to \c null if you don't want a top-left selection handle.
+ Set this property to \c null if you don't want a selection handle on the bottom-right.
\sa topLeftHandle
*/