diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-11-18 20:34:17 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-11-25 21:30:18 +0000 |
commit | b0fd258cbb2a17610a185f76076cf6cda0bdfc09 (patch) | |
tree | 7a4f711ca7bb07ab54a505936cbe547552598e22 /src/quicktemplates2/qquickpopupitem.cpp | |
parent | e33443d9b8de1917d8d3b85f185bbb75b78dc448 (diff) |
Add Drawer::interactive
[ChangeLog][Controls][Drawer] Added interactive property that specifies
whether the drawer reacts to swipes. This can be used to make drawer a
non-closable persistent side-bar.
Task-number: QTBUG-53169
Change-Id: I00a794b5ce47b86fcb28e0db784ca0488cd13a7d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpopupitem.cpp')
-rw-r--r-- | src/quicktemplates2/qquickpopupitem.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickpopupitem.cpp b/src/quicktemplates2/qquickpopupitem.cpp index de8a9de2..8a84cc20 100644 --- a/src/quicktemplates2/qquickpopupitem.cpp +++ b/src/quicktemplates2/qquickpopupitem.cpp @@ -152,8 +152,11 @@ bool QQuickPopupItem::event(QEvent *event) if (event->type() == QEvent::Shortcut) { QShortcutEvent *se = static_cast<QShortcutEvent *>(event); if (se->shortcutId() == d->escapeId || se->shortcutId() == d->backId) { - QQuickPopupPrivate::get(d->popup)->closeOrReject(); - return true; + QQuickPopupPrivate *p = QQuickPopupPrivate::get(d->popup); + if (p->interactive) { + p->closeOrReject(); + return true; + } } } return QQuickItem::event(event); |