<?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[[SOLVED] Best approach to include a graphical scene in a classical GUI]]></title><description><![CDATA[<p dir="auto">Suppose you have a classical GUI with menu's, tree views etc. You want to include a simple statical graphical scene with lines, circles rectangles that you can click on to trigger events. What is the best approach:</p>
<ul>
<li>QPainter on a QFrame, but then how to know on which graphical item the user clicks?</li>
<li>Qt Quick, seems overkill and not sure it can be embedded</li>
<li>QGraphicsScene, same remark as it needs QGraphicsView to show it</li>
<li>Other possibilities?</li>
</ul>
<p dir="auto">Please advise!</p>
]]></description><link>https://forum.qt.io/topic/59090/solved-best-approach-to-include-a-graphical-scene-in-a-classical-gui</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 02:05:09 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/59090.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Sep 2015 10:18:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] Best approach to include a graphical scene in a classical GUI on Wed, 23 Sep 2015 12:51:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/janlaloux">@<bdi>JanLaloux</bdi></a><br />
Aha, sounds interesting.<br />
Yeah, I assumed that it would as it sort<br />
of sounded a bit like that.<br />
Should be easy to adjust it for your needs and is not much more code<br />
than some basic widget drawing would be.</p>
]]></description><link>https://forum.qt.io/post/291242</link><guid isPermaLink="true">https://forum.qt.io/post/291242</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Wed, 23 Sep 2015 12:51:49 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Best approach to include a graphical scene in a classical GUI on Wed, 23 Sep 2015 12:48:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> Correct, it's numbers that are encircled. The Diagram Scene example looks interesting!</p>
]]></description><link>https://forum.qt.io/post/291241</link><guid isPermaLink="true">https://forum.qt.io/post/291241</guid><dc:creator><![CDATA[JanLaloux]]></dc:creator><pubDate>Wed, 23 Sep 2015 12:48:00 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Best approach to include a graphical scene in a classical GUI on Wed, 23 Sep 2015 11:58:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/janlaloux">@<bdi>JanLaloux</bdi></a><br />
Ok, that kind of static.<br />
Also see the Diagram Scene sample. Its a mini drawing app and it has arrow drawing :)<br />
The "items" that will be encircled. Those are text or ?</p>
]]></description><link>https://forum.qt.io/post/291231</link><guid isPermaLink="true">https://forum.qt.io/post/291231</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Wed, 23 Sep 2015 11:58:12 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Best approach to include a graphical scene in a classical GUI on Wed, 23 Sep 2015 11:53:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> It will change but in a "static" way: items can be hidden by clicking on it, the result of calculations will be shown by means of encircling items and drawing arrows between them, so no animations or other fancy stuff.<br />
I will have a look at the 40000 Chips example, thanks.</p>
]]></description><link>https://forum.qt.io/post/291229</link><guid isPermaLink="true">https://forum.qt.io/post/291229</guid><dc:creator><![CDATA[JanLaloux]]></dc:creator><pubDate>Wed, 23 Sep 2015 11:53:50 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Best approach to include a graphical scene in a classical GUI on Wed, 23 Sep 2015 11:04:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/janlaloux">@<bdi>JanLaloux</bdi></a> said:</p>
<p dir="auto">I vote for QGraphicsView  as would be very fast to implement,<br />
Please see the 40000 sample.</p>
<p dir="auto">You could also just use widgets with your own paint event and a property to<br />
specify if its a circle / rectangle. Sort of a Shape Widget and then just override mouse events and you know when its clicked.  But close lines might cause clicking issues.</p>
<p dir="auto">Will it change over time or be like a static image ?</p>
]]></description><link>https://forum.qt.io/post/291224</link><guid isPermaLink="true">https://forum.qt.io/post/291224</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Wed, 23 Sep 2015 11:04:37 GMT</pubDate></item></channel></rss>