From 149fce1c2bb1de5f716bbf6e5a6ee244257a97b1 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:46:33 +0100 Subject: [PATCH] Show tooltip updates while the tooltip is visible --- lib/utils/auto-update-tooltip-label.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/utils/auto-update-tooltip-label.cpp b/lib/utils/auto-update-tooltip-label.cpp index 3a02e2ab..03d32aba 100644 --- a/lib/utils/auto-update-tooltip-label.cpp +++ b/lib/utils/auto-update-tooltip-label.cpp @@ -1,5 +1,7 @@ #include "auto-update-tooltip-label.hpp" +#include + namespace advss { AutoUpdateHelpIcon::AutoUpdateHelpIcon( @@ -16,6 +18,7 @@ AutoUpdateHelpIcon::AutoUpdateHelpIcon( void AutoUpdateHelpIcon::enterEvent(QEnterEvent *event) { + UpdateTooltip(); _timer->start(_updateIntervalMs); QLabel::enterEvent(event); } @@ -28,7 +31,12 @@ void AutoUpdateHelpIcon::leaveEvent(QEvent *event) void AutoUpdateHelpIcon::UpdateTooltip() { - setToolTip(_callback()); + if (!underMouse()) { + return; + } + + const QString text = _callback(); + QToolTip::showText(QCursor::pos(), text, this); } } // namespace advss