aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-07-11 13:35:11 +0200
committerMitch Curtis <mitch.curtis@qt.io>2016-07-11 13:40:34 +0000
commit7c3600887ed79b6758dbbabd58fc3240846d6c65 (patch)
treec8ce45a5f1035c5499dc51b330d686b4e9704fed /src
parentc5617da5fd563e5bf1894a2b0303ae3ae835e20d (diff)
SwipeDelegate: document which items can be used in left/right/behind
Task-number: QTBUG-54658 Change-Id: Ie8bb1fa6669c7dd1cd18199d01c773a1854edad4 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/imports/controls/doc/src/includes/qquickswipedelegate-interaction.qdocinc5
-rw-r--r--src/quicktemplates2/qquickswipedelegate.cpp6
2 files changed, 11 insertions, 0 deletions
diff --git a/src/imports/controls/doc/src/includes/qquickswipedelegate-interaction.qdocinc b/src/imports/controls/doc/src/includes/qquickswipedelegate-interaction.qdocinc
new file mode 100644
index 00000000..05aeadb6
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickswipedelegate-interaction.qdocinc
@@ -0,0 +1,5 @@
+Both interactive and non-interactive items can be used here. Normal
+event handling rules apply; if an interactive control like \l Button
+is used, interaction signals of SwipeDelegate such as
+\l {AbstractButton::}{clicked()} will not get emitted if the button
+is clicked.
diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp
index 1edc5018..aedaf29a 100644
--- a/src/quicktemplates2/qquickswipedelegate.cpp
+++ b/src/quicktemplates2/qquickswipedelegate.cpp
@@ -736,6 +736,8 @@ QQuickSwipeDelegate::QQuickSwipeDelegate(QQuickItem *parent) :
The left delegate sits behind both \l {Control::}{contentItem} and
\l {Control::}{background}. When the SwipeDelegate is swiped to the right,
this item will be gradually revealed.
+
+ \include qquickswipedelegate-interaction.qdocinc
\row
\li behind
\li This property holds the delegate that is shown when the
@@ -745,6 +747,8 @@ QQuickSwipeDelegate::QQuickSwipeDelegate(QQuickItem *parent) :
\l {Control::}{contentItem} and \l {Control::}{background}. However, a
SwipeDelegate whose \c behind has been set can be continuously swiped
from either side, and will always show the same item.
+
+ \include qquickswipedelegate-interaction.qdocinc
\row
\li right
\li This property holds the right delegate.
@@ -752,6 +756,8 @@ QQuickSwipeDelegate::QQuickSwipeDelegate(QQuickItem *parent) :
The right delegate sits behind both \l {Control::}{contentItem} and
\l {Control::}{background}. When the SwipeDelegate is swiped to the left,
this item will be gradually revealed.
+
+ \include qquickswipedelegate-interaction.qdocinc
\row
\li leftItem
\li This property holds the item instantiated from the \c left component.