Add back a public slot to procedurally hide a ToolTipArea's tooltip.

This commit is contained in:
Eike Hein 2014-03-24 15:18:52 +01:00
parent 99900255bf
commit 6a6bf8e80c
2 changed files with 11 additions and 0 deletions

View File

@ -224,6 +224,11 @@ void ToolTip::setInteractive(bool interactive)
emit interactiveChanged();
}
void ToolTip::hideToolTip()
{
tooltipDialogInstance()->dismiss();
}
QVariant ToolTip::icon() const
{
if (m_icon.isValid()) {

View File

@ -145,6 +145,12 @@ public:
void setInteractive(bool interactive);
public Q_SLOTS:
/**
* Hides the tooltip if shown. Does not affect whether the tooltip area is active.
*/
void hideToolTip();
protected:
bool childMouseEventFilter(QQuickItem *item, QEvent *event);
void hoverEnterEvent(QHoverEvent *event);