Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.5.0, 6.5.1
-
None
-
Any
Description
I'm getting what I believe is "unexpected" results from handling this signal from QXYSeries.
I have this slot for handling the hovered signal:
void ChartTab::scoreHovered(const QPointF& point, bool state) { if (state) { const QPoint globalMouseLocation(QCursor::pos()); QLocale locale; QToolTip::showText(globalMouseLocation, locale.toString(point.y(), 'f', 2), this); } }
When I position the mouse over a data point in the series, then slot is invoked with state set to true and my code displays the tooltip, but it also sets state to true when I position the mouse pointer over the line that connects the points in the series.
I would have expected it to only set state to true when the mouse is over an actual data point in the series.
It's been suggested that my expectation may differ from the intended behaviour, but to me the description of the signal which says:
"This signal is emitted when a mouse is hovered over the point point in the chart. When the mouse moves over the point, state turns true, and when the mouse moves away again, it turns false."
clearly means it should only be emitted for data points in the series, not for any arbitrary position on the lines connecting the data points