aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickoverlay.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-07-10 11:03:54 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-07-10 14:53:48 +0000
commita187d74d0a1e269f0632a79c65e4f30d9801368d (patch)
treebcf51d93b118d48f3f4f0a83126aa1a0850107cd /src/quicktemplates2/qquickoverlay.cpp
parent543b63ba9933a24f9b87321e0ec7e3ed0e5212bf (diff)
Doc: provide code snippets for Overlay.modal and Overlay.modeless
Change-Id: I0ea789c0ba3a153b00ac3ab6501ecf10f6c733ce Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickoverlay.cpp')
-rw-r--r--src/quicktemplates2/qquickoverlay.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp
index eba31fe2..16ba714b 100644
--- a/src/quicktemplates2/qquickoverlay.cpp
+++ b/src/quicktemplates2/qquickoverlay.cpp
@@ -643,6 +643,11 @@ QQuickOverlay *QQuickOverlayAttached::overlay() const
The property can be attached to any popup.
+ For example, to change the color of the background dimming for a modal
+ popup, the following code can be used:
+
+ \snippet qtquickcontrols2-overlay-modal.qml 1
+
\sa Popup::modal
*/
QQmlComponent *QQuickOverlayAttached::modal() const
@@ -671,6 +676,11 @@ void QQuickOverlayAttached::setModal(QQmlComponent *modal)
The property can be attached to any popup.
+ For example, to change the color of the background dimming for a modeless
+ popup, the following code can be used:
+
+ \snippet qtquickcontrols2-overlay-modeless.qml 1
+
\sa Popup::dim
*/
QQmlComponent *QQuickOverlayAttached::modeless() const