From a187d74d0a1e269f0632a79c65e4f30d9801368d Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 10 Jul 2018 11:03:54 +0200 Subject: Doc: provide code snippets for Overlay.modal and Overlay.modeless Change-Id: I0ea789c0ba3a153b00ac3ab6501ecf10f6c733ce Reviewed-by: Richard Moe Gustavsen --- src/quicktemplates2/qquickoverlay.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/quicktemplates2/qquickoverlay.cpp') 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 -- cgit v1.2.3