diff --git a/tooltipmanager.cpp b/tooltipmanager.cpp index 25df21b8a..0b243ec31 100644 --- a/tooltipmanager.cpp +++ b/tooltipmanager.cpp @@ -236,6 +236,12 @@ void ToolTipManager::setToolTipContent(QGraphicsWidget *widget, const ToolTipCon tooltip->updateTheme(); } +void ToolTipManager::clearToolTipContent(QGraphicsWidget *widget) +{ + ToolTipContent t; + setToolTipContent(widget, t); +} + bool ToolTipManager::widgetHasToolTip(QGraphicsWidget *widget) const { return d->tooltips.contains(widget); diff --git a/tooltipmanager.h b/tooltipmanager.h index c9dad242c..a0b2f35c3 100644 --- a/tooltipmanager.h +++ b/tooltipmanager.h @@ -179,6 +179,12 @@ public: */ void setToolTipContent(QGraphicsWidget *widget, const ToolTipContent &data); + /** + * Clears the tooltip data associated with this widget, but keeps + * the widget registered. + */ + void clearToolTipContent(QGraphicsWidget *widget); + /** * Checks whether a widget has a tooltip associated with it. *