<?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[Drawing circles  using QPainter]]></title><description><![CDATA[<p dir="auto">Hi,<br />
1-&gt;I need to draw circles based on user value in a table(Qtableview).<br />
2-&gt;draw/connect two circle using line (CD)<br />
3-&gt;shows direction in circle like arc kind (---&gt;)<br />
4-&gt;i  need to display this circle in my tab2 (Qtabwidget)<br />
How to do this ?</p>
<p dir="auto">like simply i can do like this:</p>
<pre><code>{
QPainter myellip(this);
QPen epen;
int x = 10;
epen.setWidth(3);
epen.setColor(Qt::yellow);
epen.setBrush(Qt::SolidPattern);
// myellip.setBrush(Qt::SolidPattern);
myellip.setPen(epen);
myellip.drawEllipse(QRect(150, 300, 100, 100));
}
</code></pre>
<p dir="auto">How can i do these all ? How to approach ?</p>
]]></description><link>https://forum.qt.io/topic/127061/drawing-circles-using-qpainter</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Jul 2026 11:50:35 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/127061.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 May 2021 19:15:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Drawing circles  using QPainter on Mon, 31 May 2021 09:08:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/n-2204">@<bdi>n-2204</bdi></a></p>
<p dir="auto">Hi<br />
If you data is from a View, its actually from its model.</p>
<p dir="auto">but was it a question or ?</p>
<p dir="auto">QPainter has all the functions you need to do it.</p>
<p dir="auto">except maybe for the small arrow inside the circle</p>
]]></description><link>https://forum.qt.io/post/662559</link><guid isPermaLink="true">https://forum.qt.io/post/662559</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 31 May 2021 09:08:22 GMT</pubDate></item><item><title><![CDATA[Reply to Drawing circles  using QPainter on Mon, 31 May 2021 08:32:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a><br />
ok Thankyou..<br />
using Qpixmap &amp; Qpainter is a good approach to draw the circles as i shared image above and i need to draw arc, lines &amp; input for circle is from Qtableview</p>
]]></description><link>https://forum.qt.io/post/662538</link><guid isPermaLink="true">https://forum.qt.io/post/662538</guid><dc:creator><![CDATA[n-2204]]></dc:creator><pubDate>Mon, 31 May 2021 08:32:55 GMT</pubDate></item><item><title><![CDATA[Reply to Drawing circles  using QPainter on Sat, 29 May 2021 08:36:25 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
well you can paint on a pixmap and show in a QLabel</p>
<pre><code> QPixmap pix(200, 200);
  pix.fill(Qt::blue);
  QPainter painter (&amp;pix);
  painter.setRenderHint(QPainter::Antialiasing, true);
  ..... draw ...
  ui-&gt;label-&gt;setPixmap(pix);
</code></pre>
]]></description><link>https://forum.qt.io/post/662245</link><guid isPermaLink="true">https://forum.qt.io/post/662245</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sat, 29 May 2021 08:36:25 GMT</pubDate></item><item><title><![CDATA[Reply to Drawing circles  using QPainter on Fri, 28 May 2021 19:00:42 GMT]]></title><description><![CDATA[<p dir="auto">No, you cannot paint on another widget.</p>
]]></description><link>https://forum.qt.io/post/662201</link><guid isPermaLink="true">https://forum.qt.io/post/662201</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 28 May 2021 19:00:42 GMT</pubDate></item><item><title><![CDATA[Reply to Drawing circles  using QPainter on Fri, 28 May 2021 13:16:31 GMT]]></title><description><![CDATA[<p dir="auto">Oh,,actually i haven't created class for tab2 widget<br />
QPainter myellip(this);<br />
can't i do like this-&gt; QPainter myellip(ui.tab2);</p>
]]></description><link>https://forum.qt.io/post/662149</link><guid isPermaLink="true">https://forum.qt.io/post/662149</guid><dc:creator><![CDATA[n-2204]]></dc:creator><pubDate>Fri, 28 May 2021 13:16:31 GMT</pubDate></item><item><title><![CDATA[Reply to Drawing circles  using QPainter on Fri, 28 May 2021 12:59:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/n-2204">@<bdi>n-2204</bdi></a><br />
Hi,<br />
maybe try use function paintEvent()  in tab2 ie:</p>
<pre><code>void tab2::paintEvent(QPaintEvent* event)  
{
QPainter myellip(this);
QPen epen;
int x = 10;
epen.setWidth(3);
epen.setColor(Qt::yellow);
epen.setBrush(Qt::SolidPattern);
 // myellip.setBrush(Qt::SolidPattern);
myellip.setPen(epen);
myellip.drawEllipse(QRect(150, 300, 100, 100));
}
</code></pre>
]]></description><link>https://forum.qt.io/post/662144</link><guid isPermaLink="true">https://forum.qt.io/post/662144</guid><dc:creator><![CDATA[Bondrusiek]]></dc:creator><pubDate>Fri, 28 May 2021 12:59:38 GMT</pubDate></item><item><title><![CDATA[Reply to Drawing circles  using QPainter on Fri, 28 May 2021 12:37:57 GMT]]></title><description><![CDATA[<pre><code>void table_model::paintEvent(QPaintEvent* event)  
{
QPainter myellip(this);
QPen epen;
int x = 10;
epen.setWidth(3);
epen.setColor(Qt::yellow);
epen.setBrush(Qt::SolidPattern);
 // myellip.setBrush(Qt::SolidPattern);
myellip.setPen(epen);
myellip.drawEllipse(QRect(150, 300, 100, 100));
}
</code></pre>
<blockquote>
<p dir="auto">how can i display this circle in my tab2 (Qtabwidget)</p>
</blockquote>
]]></description><link>https://forum.qt.io/post/662136</link><guid isPermaLink="true">https://forum.qt.io/post/662136</guid><dc:creator><![CDATA[n-2204]]></dc:creator><pubDate>Fri, 28 May 2021 12:37:57 GMT</pubDate></item><item><title><![CDATA[Reply to Drawing circles  using QPainter on Fri, 28 May 2021 10:30:34 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/956753f2-b954-474c-a4a8-7bf42847582d.png" alt="09cf0862-54b2-457d-b0e3-4af3757c3add-image.png" class=" img-fluid img-markdown" /><br />
like this I need to do<br />
How to do  ?<br />
If anyone has any example related to this plz share</p>
]]></description><link>https://forum.qt.io/post/662001</link><guid isPermaLink="true">https://forum.qt.io/post/662001</guid><dc:creator><![CDATA[n-2204]]></dc:creator><pubDate>Fri, 28 May 2021 10:30:34 GMT</pubDate></item><item><title><![CDATA[Reply to Drawing circles  using QPainter on Thu, 27 May 2021 19:21:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Do you mean as an overlay ?</p>
]]></description><link>https://forum.qt.io/post/661952</link><guid isPermaLink="true">https://forum.qt.io/post/661952</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 27 May 2021 19:21:57 GMT</pubDate></item></channel></rss>