summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2015-08-29 14:47:20 +0200
committerKai Uwe Broulik <kde@privat.broulik.de>2015-08-29 16:42:24 +0000
commit973474129baec084b582481ffbc8725b33ad320c (patch)
treeb0f2cfde2ed075b9c6fabf879189750cd9f3483d
parentbe487bdb038cb01fa938adde9997e2761900e29d (diff)
downloadqtquickcontrols-upstream.tar.gz
qtquickcontrols-upstream.tar.bz2
qtquickcontrols-upstream.zip
Don't show tooltip when the window of the button is hiddenv5.5.90+alpha1upstream
If you have a close button with a tooltip that closes the view it is in, the tooltip will spawn nonetheless. The Window the item is in does not affect its visible property. Change-Id: I71e73df2ed3761c8fd3d1deea78e94b81ecbaf88 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
-rw-r--r--src/controls/Private/BasicButton.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/controls/Private/BasicButton.qml b/src/controls/Private/BasicButton.qml
index 5de95aa9..9a9cf71e 100644
--- a/src/controls/Private/BasicButton.qml
+++ b/src/controls/Private/BasicButton.qml
@@ -38,6 +38,7 @@ import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
import QtQuick.Controls.Styles 1.1
+import QtQuick.Window 2.2
/*!
\qmltype BasicButton
@@ -205,7 +206,7 @@ Control {
Timer {
interval: 1000
- running: behavior.containsMouse && !pressed && tooltip.length
+ running: behavior.containsMouse && !pressed && tooltip.length && behavior.Window.visibility !== Window.Hidden
onTriggered: Tooltip.showText(behavior, Qt.point(behavior.mouseX, behavior.mouseY), tooltip)
}
}