Skip to content

SpectrumWidget::mouseMoveEvent kills tooltips on MEM+ and DAX sidebar buttons #2355

Description

@TnxQSO-Admin

Report preparation

  • I used the AI-assisted bug report tool (Help → Support → File an Issue)
  • I have attached a support bundle or log file

What happened?

What Happened

The MEM+ and DAX buttons in the SpectrumOverlayMenu sidebar show their tooltip
briefly (~0.5 s) and then it disappears. MEM▶, the button immediately above,
works correctly.

All three buttons have tooltips set unconditionally in the constructor
(SpectrumOverlayMenu.cpp:148-158). No event filter intercepts QEvent::ToolTip
for these widgets. No setToolTipDuration override exists anywhere in the codebase.

Root Cause

SpectrumWidget has setMouseTracking(true) active at all times. Its
mouseMoveEvent calls QToolTip::hideText() unconditionally in the band plan bar
region (line 2470). Because SpectrumOverlayMenu is a child widget drawn over
SpectrumWidget, mouse-move events over the overlay buttons reach
SpectrumWidget::mouseMoveEvent, which tests the cursor y-position against
internal spectrum regions -- not against child widget bounds.

SpectrumOverlayMenu uses manual geometry (move()). Button positions within the
widget, and their corresponding y-coordinates inside SpectrumWidget:

Button y in overlay Lands in SpectrumWidget region
MEM▶ 146-167 FFT spectrum area -- no hideText()
MEM+ 170-191 Band plan bar (y=162-170) -- hideText() fires on first hover pixel
DAX 194-215 Waterfall zone -- separate code path, hideText() likely fires there too

MEM+ starts at exactly the bottom pixel of the band plan bar. Any hover over MEM+
immediately fires hideText() before Qt's tooltip timer can complete. DAX falls
in the waterfall zone where a similar suppression applies.

Suggested Fix

Guard every QToolTip::hideText() call in SpectrumWidget::mouseMoveEvent and
updateTrackedCursorState() with a childAt() check. If the cursor is over a
child widget, skip the hideText() call entirely -- the child owns the tooltip
at that point.

Example for mouseMoveEvent:

void SpectrumWidget::mouseMoveEvent(QMouseEvent* ev)
{
    // Let child widgets (e.g. SpectrumOverlayMenu buttons) own their tooltips.
    if (childAt(ev->position().toPoint())) {
        ev->ignore();
        return;
    }
    // ... existing code ...
}

The same guard should be applied to updateTrackedCursorState() before the
hideText() call at line 1654.

Code References

  • Tooltip set on buttons: SpectrumOverlayMenu.cpp:148-158
  • QToolTip::hideText() in band bar path: SpectrumWidget.cpp:2470
  • QToolTip::hideText() in updateTrackedCursorState(): SpectrumWidget.cpp:1654, 1677
  • setMouseTracking(true): SpectrumWidget.cpp:169, 2708, 2828, 3216, 3224
  • Button layout with y-positions: SpectrumOverlayMenu.cpp:660-680

What did you expect?

Acceptance Criteria

  • Hovering MEM+ shows its tooltip for the full Qt default duration
  • Hovering DAX shows its tooltip for the full Qt default duration
  • MEM▶ tooltip continues to work
  • Spot cluster tooltips and TNF tooltips in SpectrumWidget continue to work
  • Band plan bar hover tooltips continue to work

Steps to reproduce

Steps to Reproduce

  1. Open AetherSDR (radio connection not required).
  2. Click to expand the spectrum sidebar.
  3. Hover over MEM▶ -- tooltip appears and stays.
  4. Hover over MEM+ -- tooltip appears for ~0.5 s then disappears.
  5. Hover over DAX -- same as MEM+.

AetherSDR version

0.9.6

Radio model & firmware

FLEX-6600

Operating system

Linux

OS version and hardware

CachyOS @latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfacebugSomething isn't workingmaintainer-reviewRequires maintainer review before any action is takenspectrumPanadapter and waterfall

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions