aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@gmail.com>2016-03-19 08:05:57 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-03-21 19:54:18 +0000
commit9d590d6313ba579a2c2112e4b314cacd05d09a50 (patch)
tree40994563221d7eafc1a113cbe316243bdd18014d /examples
parent5e162c68fade8e5d4175deb92496376bd7be43d7 (diff)
Change the default value of QQuickPopup::closePolicy
When Popup::ClosePolicy was introduced, I thought that it would be better to not set OnPressOutside by default, because not all popups necessarily want to close on press outside. However, I've realized that every time I do Button { onClicked: popup.open() Popup { } } ...there's literally no interactive way to close the popup (popups don't take focus by default, so Esc doesn't work). Provided that a top-level QWidget with the Qt::Popup flag set also closes automatically on press outside, it probably makes more sense for us to follow the same pattern so that poor new users don't have to lookup the docs just to figure out how to make a popup close. :) In this case it's less troublesome to specify a different default value in those special scenarios/subclasses where closing on press outside is not desired (eg. the upcoming Popup-based Drawer). Change-Id: Iaeab4c548d63728df12232d8b65d469f0a2d80f5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/controls/gallery/gallery.qml2
1 files changed, 0 insertions, 2 deletions
diff --git a/examples/controls/gallery/gallery.qml b/examples/controls/gallery/gallery.qml
index 0c44cce3..aba183db 100644
--- a/examples/controls/gallery/gallery.qml
+++ b/examples/controls/gallery/gallery.qml
@@ -218,7 +218,6 @@ ApplicationWindow {
height: settingsColumn.implicitHeight + topPadding + bottomPadding
modal: true
focus: true
- closePolicy: Popup.OnEscape | Popup.OnPressOutside
contentItem: ColumnLayout {
id: settingsColumn
@@ -295,7 +294,6 @@ ApplicationWindow {
y: window.height / 6
width: Math.min(window.width, window.height) / 3 * 2
contentHeight: aboutColumn.height
- closePolicy: Popup.OnEscape | Popup.OnPressOutside
Column {
id: aboutColumn