<?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[How can I do mouse click event on graph using QChartView?]]></title><description><![CDATA[<p dir="auto">I created a QChartView on top of a grid layout to draw the graph.(<br />
I referenced the Creator's sample code.)</p>
<p dir="auto">When I click this graph, I want to display the mouse click position on the text label in the main window.</p>
<p dir="auto">I inherited QChartView and created a ChartView class and defined the mousePressEvent() function, but the mouse click did not work.</p>
<p dir="auto">Not sure what i am missing<br />
It would be appreciated if you uploaded the example code that can be operated.</p>
<p dir="auto">I'm using C++/Window/Visual Studio 2019/Qt 5.15.1</p>
<p dir="auto">Thank you</p>
]]></description><link>https://forum.qt.io/topic/120068/how-can-i-do-mouse-click-event-on-graph-using-qchartview</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Nov 2026 08:36:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/120068.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 Oct 2020 15:33:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How can I do mouse click event on graph using QChartView? on Mon, 19 Oct 2020 13:29:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sys1">@<bdi>sys1</bdi></a></p>
<p dir="auto">Why not? What is happening? How did you implement it?</p>
<p dir="auto"><a href="https://doc.qt.io/qt-5/qchartview.html#mousePressEvent" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qchartview.html#mousePressEvent</a></p>
]]></description><link>https://forum.qt.io/post/622981</link><guid isPermaLink="true">https://forum.qt.io/post/622981</guid><dc:creator><![CDATA[Pl45m4]]></dc:creator><pubDate>Mon, 19 Oct 2020 13:29:28 GMT</pubDate></item><item><title><![CDATA[Reply to How can I do mouse click event on graph using QChartView? on Mon, 19 Oct 2020 06:05:27 GMT]]></title><description><![CDATA[<p dir="auto">Thank you</p>
<p dir="auto">But, The mouse press event itself doesn't seem to work.</p>
<p dir="auto">So I want an example code with a mouse press event action.</p>
]]></description><link>https://forum.qt.io/post/622923</link><guid isPermaLink="true">https://forum.qt.io/post/622923</guid><dc:creator><![CDATA[sys1]]></dc:creator><pubDate>Mon, 19 Oct 2020 06:05:27 GMT</pubDate></item><item><title><![CDATA[Reply to How can I do mouse click event on graph using QChartView? on Sun, 18 Oct 2020 16:07:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sys1">@<bdi>sys1</bdi></a></p>
<blockquote>
<p dir="auto">I want to display the mouse click position</p>
</blockquote>
<p dir="auto">Don't know about your <code>mousePressEvent()</code>.  But when you get it working you might be interested in <a href="https://stackoverflow.com/questions/44067831/get-mouse-coordinates-in-qchartviews-axis-system" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/44067831/get-mouse-coordinates-in-qchartviews-axis-system</a>.</p>
]]></description><link>https://forum.qt.io/post/622841</link><guid isPermaLink="true">https://forum.qt.io/post/622841</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 18 Oct 2020 16:07:22 GMT</pubDate></item></channel></rss>