Skip to content

Automation bridge: tooltip and dumpTree cannot reach an item-view cell, so per-cell tooltips are not provable #5503

Description

@skerker

What

A way to read, or force-show, the tooltip of one cell in a QTableWidget / QTreeWidget / QListWidget over the automation bridge, and to read a cell's text and tooltip as data.

Why

tooltip <target> sends its QHelpEvent at the target widget's centre and reads the widget's static toolTip property (src/core/AutomationServer.cpp:9828, :9837; the property read is what produces target has no tooltip at :9825). An item view's tooltip is not on the widget: it is the item's Qt::ToolTipRole, resolved by QAbstractItemView::viewportEvent from the help event's position. So on any table the verb answers target has no tooltip, and dumpTree lists the table but not its items.

Hit tonight proving #5130: the Network Diagnostics → TCI Clients endpoint cell reads 127.0.0.1:56564 (Python) (provable from grab), and its tooltip carries the client's executable path and version — the thing the review asked about — but only a human hover could see it. A hand screenshot of a Qt tooltip is unreliable because the tip hides on mouse movement.

Sibling of #4849 (hover x/y + a tooltip read-back for the panadapter's position-dependent tips), not a duplicate: item views need a help event at a point (or a role read), not a mouse move, so #4849's hover <target> x y alone would not reach them.

Code references (origin/main 293240a7)

  • src/core/AutomationServer.cpp:9793 doTooltip() — centre-only QHelpEvent, static-property read.
  • src/core/AutomationServer.cpp:3847 doDumpTree() — widgets only; item-view rows/cells are not surfaced.
  • docs/automation-bridge.md:1760 — the tooltip verb's reference entry.

Proposed change

Either or both, all inside AutomationServer + docs:

  1. cell <target> <row> <col> — read verb returning the item's text, toolTip (Qt::ToolTipRole), accessibleText, and whether the row is selected. Data, no hover, no timing. This alone makes a per-cell tooltip assertable in one round trip and is the shape evidence wants.
  2. tooltip <target> <row> <col> — send the QHelpEvent at that cell's visualRect() centre on the view's viewport, so the existing grab QTipLabel path works for item views too (the same extension automation bridge: hover verb ignores x/y, so point-hover tooltips aren't provable #4849 asks of hover).

Both resolve the view through the existing target rules; a target that is not a QAbstractItemView errors.

Acceptance

  • cell networkDiagnosticsTciClients 0 1 (or the table's resolved target) returns the endpoint cell's text and its tooltip on a connected TCI client.
  • tooltip <table> 0 1 shows the tip and grab QTipLabel captures it.
  • bridge_docs_check passes with both verbs documented in docs/automation-bridge.md.
  • Non-item-view targets return a clear error, existing tooltip <target> behaviour unchanged.

Non-goals

Moving the OS cursor; reading tips raised by app code via QToolTip::showText (that read-back is #4849's ask 2).

Refs #4849, #5130.

— authored by agent (Claude Code) on behalf of @skerker

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfaceenhancementImprovement to existing featuremaintainer-reviewRequires maintainer review before any action is taken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions