<?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[Paint on widget not in paintEvent and magnifier]]></title><description><![CDATA[<p dir="auto">I see, that "IMPORTANT! QPainter can paint on QWidget only in paintEvent(QPaintEvent*). " (from Wiki qt)<br />
How to draw rectangle or text on click button?<br />
Goal: application magnifier glass, it must</p>
<ul>
<li>read pixmap from desktop : pixmap = screen-&gt;grabWindow(0);<br />
how to read only part of pixmap and often refreshing?<br />
next, I must onMouseMove, read small rectangle near mouse pointer to pixmap, next draw not in paintEvent in my application form N times greater, draw scaled bitmap.<br />
I must capture mouse, it must  receive mouse messages, even if mouse is far from application window.</li>
</ul>
]]></description><link>https://forum.qt.io/topic/139238/paint-on-widget-not-in-paintevent-and-magnifier</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 01:21:56 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139238.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 Sep 2022 17:57:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Paint on widget not in paintEvent and magnifier on Sun, 11 Sep 2022 18:03:25 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
The tricky part is the drag a rect outside the Qt application.<br />
I used the transparent window solution as talked about here<br />
<a href="http://www.ifnamemain.com/posts/2014/Jul/11/screen_capture_1/" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.ifnamemain.com/posts/2014/Jul/11/screen_capture_1/</a></p>
]]></description><link>https://forum.qt.io/post/728238</link><guid isPermaLink="true">https://forum.qt.io/post/728238</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sun, 11 Sep 2022 18:03:25 GMT</pubDate></item></channel></rss>