<?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[DrawText() taking high cpu usage.]]></title><description><![CDATA[<p dir="auto">hello everyone!!<br />
DrawText() is taking lot of CPU usage.what else to use instead of this. or is there any other way to improve DrawText().</p>
]]></description><link>https://forum.qt.io/topic/16054/drawtext-taking-high-cpu-usage</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 08:43:04 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/16054.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Apr 2012 14:44:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DrawText() taking high cpu usage. on Sat, 21 Apr 2012 21:58:23 GMT]]></title><description><![CDATA[<p dir="auto">Moved to the General Forum, this is Qt related and no C++ issue.</p>
]]></description><link>https://forum.qt.io/post/136475</link><guid isPermaLink="true">https://forum.qt.io/post/136475</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sat, 21 Apr 2012 21:58:23 GMT</pubDate></item><item><title><![CDATA[Reply to DrawText() taking high cpu usage. on Sat, 21 Apr 2012 15:45:53 GMT]]></title><description><![CDATA[<p dir="auto">Please put something like<br />
@<br />
qDebug() &lt;&lt; <strong>PRETTY__FUNCTION</strong>;<br />
@<br />
or any string you like inside the reimplemented paint() function to check how many this function is called in case of one view and how many in case of 7 views.</p>
<p dir="auto">That would give a good hint.</p>
]]></description><link>https://forum.qt.io/post/136465</link><guid isPermaLink="true">https://forum.qt.io/post/136465</guid><dc:creator><![CDATA[gmaro]]></dc:creator><pubDate>Sat, 21 Apr 2012 15:45:53 GMT</pubDate></item><item><title><![CDATA[Reply to DrawText() taking high cpu usage. on Sat, 21 Apr 2012 14:46:33 GMT]]></title><description><![CDATA[<p dir="auto">yes gmaro you got it correctly.<br />
I am using one QGraphicsScene and seven QGraphicsViews.<br />
i am creating my subclassed QGraphicsItem with paint() function reimplemented and adding it to scene.<br />
actually only one view is main, and all other 6 views are copy of this <a href="http://view.It" target="_blank" rel="noopener noreferrer nofollow ugc">view.It</a> is my requirement, that ever item and operation that is in main view has to be in all other six views.<br />
high CPU load is occurring after i'm showing all other 6 views.</p>
<p dir="auto">Thank you!</p>
]]></description><link>https://forum.qt.io/post/136463</link><guid isPermaLink="true">https://forum.qt.io/post/136463</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sat, 21 Apr 2012 14:46:33 GMT</pubDate></item><item><title><![CDATA[Reply to DrawText() taking high cpu usage. on Sat, 21 Apr 2012 14:26:05 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Not sure if I understand you corretlty:</p>
<ul>
<li>one QGraphicsScene</li>
<li>7 QGraphicsViews?</li>
</ul>
<p dir="auto">You're drawing something on each QGraphicsView, not on QGraphicsScene or you're creating your Subclassed QGraphicsItem with the paint() function reimplemented and you're adding it to the scene?</p>
<p dir="auto">You're drawing something on each view? In which way? Maybe drawing on one causes calls to redraw the rest of them? So instead of 7 draws, you have 49? Or even quite-unlimited amount of them when this is wrongly set up.</p>
<p dir="auto">When this Hi-load cpu occurs? On adding item to the scene or when i.e. you're moving some item with a mouse?</p>
]]></description><link>https://forum.qt.io/post/136461</link><guid isPermaLink="true">https://forum.qt.io/post/136461</guid><dc:creator><![CDATA[gmaro]]></dc:creator><pubDate>Sat, 21 Apr 2012 14:26:05 GMT</pubDate></item><item><title><![CDATA[Reply to DrawText() taking high cpu usage. on Sat, 21 Apr 2012 13:58:58 GMT]]></title><description><![CDATA[<p dir="auto">Mr. Gmaro,<br />
i'm using Qt with GCF on Fedora 13.<br />
i've one scene from which i've 7 views in which i'm rendering text with drawText().<br />
it is fine until i'm using one view with enabled text rendering but with 6 extra views and text rendering enabled application performance get degraded and CPU usage reach to 100%. so what should i use for text rendering.<br />
i'm painting on QGraphicsItem.<br />
i'm using drawText() like this:-<br />
painter-&gt;drawText(Xpos+(labelPos[trackId].x())/zoomfactor,Ypos+((labelPos[trackId].y()))/zoomfactor,label2);</p>
<p dir="auto">Thank you!</p>
]]></description><link>https://forum.qt.io/post/136460</link><guid isPermaLink="true">https://forum.qt.io/post/136460</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sat, 21 Apr 2012 13:58:58 GMT</pubDate></item><item><title><![CDATA[Reply to DrawText() taking high cpu usage. on Fri, 20 Apr 2012 18:26:23 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">With this information there is no way in the world that someone can help you.</p>
<p dir="auto">What drawText function, which platform, where you painting, which paint device etc.</p>
<p dir="auto">On the embedded platform this is typically caused by no-hardware support for painting so the CPU must rendrer every pixel by himself.</p>
]]></description><link>https://forum.qt.io/post/136422</link><guid isPermaLink="true">https://forum.qt.io/post/136422</guid><dc:creator><![CDATA[gmaro]]></dc:creator><pubDate>Fri, 20 Apr 2012 18:26:23 GMT</pubDate></item></channel></rss>