<?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 to zoom in&#x2F;out all widgets in a GUI?]]></title><description><![CDATA[[[topic:post-is-deleted]]]]></description><link>https://forum.qt.io/topic/119747/how-to-zoom-in-out-all-widgets-in-a-gui</link><generator>RSS for Node</generator><lastBuildDate>Fri, 08 May 2026 03:06:47 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/119747.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 Oct 2020 21:52:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to zoom in&#x2F;out all widgets in a GUI? on Thu, 08 Oct 2020 10:42:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yohana">@<bdi>yohana</bdi></a><br />
I do not hear a mention of creating your own new signal for this and <code>.emit()</code>-ing it, and how you <code>connect()</code> that signal.</p>
<p dir="auto">I don't want to discourage you, but from your code it looks to me like your Python is all over the place.  You have <code>def zoomable</code> method embedding a <code>class Filter(QtCore.QObject)</code> declaration which then goes on to have its own <code>def eventFilter</code> embedded method.  I have no idea what/why you are trying to achieve here, but it would not surprise me if that leads to all sorts of problems like you report.</p>
<p dir="auto">I am not going to correct your code, but unless you have some deep reason this does not sound right at all.  You may want to look at what you are doing from a Python point of view.  I would have thought you should have <em>no</em> nested classes within <code>def</code> methods.  Perhaps if you start by sorting all of that out things will fall into place more....</p>
]]></description><link>https://forum.qt.io/post/621310</link><guid isPermaLink="true">https://forum.qt.io/post/621310</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 08 Oct 2020 10:42:51 GMT</pubDate></item><item><title><![CDATA[Reply to How to zoom in&#x2F;out all widgets in a GUI? on Thu, 08 Oct 2020 09:31:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a>  Thanks a lot for your reply! You are right, this got too complicated...<br />
After reading your reply I have tried your suggestion. When I detect the zoom through  <em>zoomable(self.img1)</em>, I connect it to a slot (I created the function <em>zoom_img1_detected</em>) and I pass the parameters <em>scalx</em> and <em>scaly</em>. Since I do this inside the function <em>image_Widget1</em> I get the error <em>AttributeError: 'main_GUI' object has no attribute 'scalx'</em>  because <em>scalx</em> is defined in <em>zoomable()</em>, which belongs to a different class than <em>main_GUI</em> :(</p>
]]></description><link>https://forum.qt.io/post/621296</link><guid isPermaLink="true">https://forum.qt.io/post/621296</guid><dc:creator><![CDATA[yohana]]></dc:creator><pubDate>Thu, 08 Oct 2020 09:31:56 GMT</pubDate></item><item><title><![CDATA[Reply to How to zoom in&#x2F;out all widgets in a GUI? on Wed, 07 Oct 2020 22:05:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yohana">@<bdi>yohana</bdi></a><br />
Gosh!  I don't know what you've done here :)  But if you detect a zoom on a widget, why not <code>emit()</code> a signal with its zoom level and the other widgets can have a slot on that to set their own zoom level the same?</p>
<p dir="auto">Unless you can just detect the zoom outside the widget and then just call to zoom the others.</p>
]]></description><link>https://forum.qt.io/post/621253</link><guid isPermaLink="true">https://forum.qt.io/post/621253</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Wed, 07 Oct 2020 22:05:43 GMT</pubDate></item></channel></rss>