<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QLineSeries::hovered]]></title><description><![CDATA[<p dir="auto">I'm getting what I believe is "unexpected" results from handling this signal.</p>
<p dir="auto">I have this slot for handling the hovered signal:</p>
<pre><code>void ChartTab::scoreHovered(const QPointF&amp; point, bool state)
{
	if (state)
	{
		const QPoint globalMouseLocation(QCursor::pos());
		QLocale locale;
		QToolTip::showText(globalMouseLocation, locale.toString(point.y(), 'f', 2), this);
	}
}
</code></pre>
<p dir="auto">When I position it over a point in the lineSeries it displays the tooltip, but it also does so when I position it over the line that connects the points in the series (and it shows that value at that location on the line).</p>
<p dir="auto">I would have expected it to only display the tooltip when over a point in the series.</p>
]]></description><link>https://forum.qt.io/topic/145902/qlineseries-hovered</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 01:31:55 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/145902.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Jun 2023 13:36:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QLineSeries::hovered on Fri, 30 Jun 2023 14:11:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> This one looks like a point of view question and I'm not going to press the issue here.</p>
<p dir="auto">I've opened:</p>
<p dir="auto"><a href="https://bugreports.qt.io/browse/QTBUG-114996" target="_blank" rel="noopener noreferrer nofollow ugc">https://bugreports.qt.io/browse/QTBUG-114996</a></p>
]]></description><link>https://forum.qt.io/post/763189</link><guid isPermaLink="true">https://forum.qt.io/post/763189</guid><dc:creator><![CDATA[Perdrix]]></dc:creator><pubDate>Fri, 30 Jun 2023 14:11:47 GMT</pubDate></item><item><title><![CDATA[Reply to QLineSeries::hovered on Fri, 30 Jun 2023 12:46:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/perdrix">@<bdi>Perdrix</bdi></a> said in <a href="/post/763181">QLineSeries::hovered</a>:</p>
<blockquote>
<p dir="auto">which I think your comment about a point anywhere on the chart is suggesting</p>
</blockquote>
<p dir="auto">No, I did not intend to suggest that.  My "point" was about the description.  Remember the method belongs to <code>QLineSeries</code>, not the <code>QChart</code>, so I would expect it to be connected with the lines drawn not the whole chart.</p>
<p dir="auto">Let's not argue about semantics.  From the description it does not surprise me that the hover is activated when "either on a plotted point or at a point somewhere along the drawn connected lines even if not on a plotted point, but not anywhere else on the chart".  That is probably what i would expect by default.</p>
<p dir="auto">So it's not what you would expect.  "I contend this is a bug."  Up to you.  I would have thought if you report it it would at best be "corrected" by a change in documentation not behaviour.  But up to you.</p>
<p dir="auto">I have suggested what you might like to do if you only want to act when hovering over actual, plotted points.  Unless you/someone else knows of a better solution.</p>
<p dir="auto">If you are not demanding hover-only then the methods of <code>QXYseries</code> concerning <code>pointLabels</code> look like they can be used to show something against the plotted points only.</p>
]]></description><link>https://forum.qt.io/post/763184</link><guid isPermaLink="true">https://forum.qt.io/post/763184</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 30 Jun 2023 12:46:16 GMT</pubDate></item><item><title><![CDATA[Reply to QLineSeries::hovered on Fri, 30 Jun 2023 12:31:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> Yes, we clearly have difference in our understanding of the meaning of point.  To me a point added to a line series (QXYSeries) is a point.  Anywhere on a line joining points is NOT a point.</p>
<p dir="auto">The Qt code appears to treat anywhere on the line connecting points as a point - IMHO it is not.</p>
<p dir="auto">Currently it emits the hovered signal text if over either any point I added, or if over the connecting lines.  No hovered signal is emitted for anywhere else on the chart (which I think your comment about a point anywhere on the chart is suggesting).</p>
<p dir="auto">I contend this is a bug.</p>
]]></description><link>https://forum.qt.io/post/763181</link><guid isPermaLink="true">https://forum.qt.io/post/763181</guid><dc:creator><![CDATA[Perdrix]]></dc:creator><pubDate>Fri, 30 Jun 2023 12:31:48 GMT</pubDate></item><item><title><![CDATA[Reply to QLineSeries::hovered on Fri, 30 Jun 2023 10:19:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/perdrix">@<bdi>Perdrix</bdi></a><br />
What type is <code>ChartTab</code>?  Are we to assume from "lineSeries" that you have a QtChart here?  "hovered signal" of what class?</p>
<p dir="auto">If we should guess you are asking about signal <a href="https://doc.qt.io/qt-5/qxyseries.html#hovered" target="_blank" rel="noopener noreferrer nofollow ugc">void QXYSeries::hovered(const QPointF &amp;point, bool state)</a>, which says:</p>
<blockquote>
<p dir="auto">This signal is emitted when a mouse is hovered over the point <em>point</em> in the chart.</p>
</blockquote>
<p dir="auto">then we may have a misunderstanding about the word "point" here?  You take that to mean an actual point which you have added to the chart, but per other Qt documentation "the point <em>point</em>" may only mean " a point specified by <code>point</code> anywhere on the chart", in the sense of a "coordinate somewhere on the chart" rather than "an actual plotted point".</p>
<p dir="auto">If that is so and you want the hover only on <em>plotted</em> points, you may have to compare the mouse coordinate against the points in the points list, looking for it being "close" to one of those?</p>
]]></description><link>https://forum.qt.io/post/763169</link><guid isPermaLink="true">https://forum.qt.io/post/763169</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 30 Jun 2023 10:19:42 GMT</pubDate></item><item><title><![CDATA[Reply to QLineSeries::hovered on Fri, 30 Jun 2023 10:10:04 GMT]]></title><description><![CDATA[<p dir="auto">I still think it should not behave as it does.  Could someone who knows please comment.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.qt.io/post/763167</link><guid isPermaLink="true">https://forum.qt.io/post/763167</guid><dc:creator><![CDATA[Perdrix]]></dc:creator><pubDate>Fri, 30 Jun 2023 10:10:04 GMT</pubDate></item></channel></rss>