Make tooltip dialog hidden on the cursor entering the inactive ToolTipArea

REVIEW: 125443
This commit is contained in:
Takahiro Hashimoto 2015-09-29 14:52:04 +09:00
parent f4c6042b37
commit 64b951fab3
2 changed files with 26 additions and 3 deletions

View File

@ -332,9 +332,12 @@ void ToolTip::hoverEnterEvent(QHoverEvent *event)
// and ask to keep it open for a bit, so other items get the chance
// to update the content before the tooltip hides -- this avoids
// flickering
tooltipDialogInstance()->keepalive();
//FIXME: showToolTip needs to be renamed in sync or something like that
showToolTip();
// It need to be considered only when other items can deal with tooltip area
if (m_active) {
tooltipDialogInstance()->keepalive();
//FIXME: showToolTip needs to be renamed in sync or something like that
showToolTip();
}
} else {
m_showTimer->start(m_interval);
}

View File

@ -85,6 +85,26 @@ Rectangle {
}
}
PlasmaCore.ToolTipArea {
width: 300
height: 50
active: false
mainText: "A"
subText: "B"
Rectangle {
color: "red"
anchors.fill: parent
}
Text {
anchors.fill: parent
text: "tooltip exists but inactive"
}
}
PlasmaCore.ToolTipArea {
width: 300
height: 50