From 973474129baec084b582481ffbc8725b33ad320c Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Sat, 29 Aug 2015 14:47:20 +0200 Subject: Don't show tooltip when the window of the button is hidden 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 --- src/controls/Private/BasicButton.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controls/Private/BasicButton.qml b/src/controls/Private/BasicButton.qml index 5de95aa9b..9a9cf71e2 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) } } -- cgit v1.2.3