+void DeviceToolButton::on_menu_hovered(QAction *action)
+{
+ assert(action);
+
+ // Only show the tooltip for device entries (they hold
+ // device pointers in their data field)
+ if (!action->data().isValid())
+ return;
+
+ device_tooltip_ = action->toolTip();
+
+ if (QToolTip::isVisible())
+ on_menu_hover_timeout();
+ else
+ QTimer::singleShot(1000, this, SLOT(on_menu_hover_timeout()));
+}
+
+void DeviceToolButton::on_menu_hover_timeout()
+{
+ if (device_tooltip_.isEmpty())
+ return;
+
+ QToolTip::showText(QCursor::pos(), device_tooltip_);
+}
+
+} // namespace widgets
+} // namespace pv