aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickpopup.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-09 03:02:20 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-09 03:02:21 +0100
commit7b48bda18f836671cda6d47d6570fc522a4361ec (patch)
treeba0093c597b5581aa6fc86964c3d95d7fe9bfe36 /src/quicktemplates2/qquickpopup.cpp
parent3afec43b69991753416380d88e22b5382b8b0832 (diff)
parent4e5601ac1c7aec6aba9ba09fe7adb7a0462da2f0 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/quicktemplates2/qquickpopup.cpp')
-rw-r--r--src/quicktemplates2/qquickpopup.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index e542e7e8..72e4f042 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -263,7 +263,6 @@ void QQuickPopupPrivate::init()
popupItem = new QQuickPopupItem(q);
popupItem->setVisible(false);
q->setParentItem(qobject_cast<QQuickItem *>(parent));
- QObject::connect(popupItem, &QQuickItem::enabledChanged, q, &QQuickPopup::enabledChanged);
QObject::connect(popupItem, &QQuickControl::paddingChanged, q, &QQuickPopup::paddingChanged);
QObject::connect(popupItem, &QQuickControl::backgroundChanged, q, &QQuickPopup::backgroundChanged);
QObject::connect(popupItem, &QQuickControl::contentItemChanged, q, &QQuickPopup::contentItemChanged);
@@ -1666,8 +1665,7 @@ void QQuickPopup::setBackground(QQuickItem *background)
The content item is the visual implementation of the popup. When the
popup is made visible, the content item is automatically reparented to
- the \l {ApplicationWindow::overlay}{overlay item} of its application
- window.
+ the \l {Overlay::overlay}{overlay item}.
\note The content item is automatically resized to fit within the
\l padding of the popup.
@@ -1807,14 +1805,20 @@ bool QQuickPopup::hasActiveFocus() const
This property holds whether the popup is modal.
Modal popups often have a distinctive background dimming effect defined
- in \l {ApplicationWindow::overlay}{overlay.modal}, and do not allow press
- or release events through to items beneath them.
+ in \l {Overlay::modal}{Overlay.modal}, and do not allow press
+ or release events through to items beneath them. For example, if the user
+ accidentally clicks outside of a popup, any item beneath that popup at
+ the location of the click will not receive the event.
On desktop platforms, it is common for modal popups to be closed only when
the escape key is pressed. To achieve this behavior, set
- \l closePolicy to \c Popup.CloseOnEscape.
+ \l closePolicy to \c Popup.CloseOnEscape. By default, \c closePolicy
+ is set to \c {Popup.CloseOnEscape | Popup.CloseOnPressOutside}, which
+ means that clicking outside of a modal popup will close it.
The default value is \c false.
+
+ \sa dim
*/
bool QQuickPopup::isModal() const
{
@@ -1846,7 +1850,7 @@ void QQuickPopup::setModal(bool modal)
Unless explicitly set, this property follows the value of \l modal. To
return to the default value, set this property to \c undefined.
- \sa modal
+ \sa modal, {Overlay::modeless}{Overlay.modeless}
*/
bool QQuickPopup::dim() const
{