<?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 set the receiver of a button?]]></title><description><![CDATA[<p dir="auto">Hi, I'm a total newbie here. I've created a class that is for handling the signals and slots of my buttons. But how do I connect my button to that new class?</p>
<p dir="auto">I feel like I'm making unnecessary trouble by putting my slots into this new class of mine, instead of just putting them into the existing MainWindow class.</p>
]]></description><link>https://forum.qt.io/topic/163386/how-to-set-the-receiver-of-a-button</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 02:21:41 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/163386.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 30 Sep 2025 15:57:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to set the receiver of a button? on Tue, 30 Sep 2025 16:04:18 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">For the how: create an instance of that class and connect as described in the <a href="https://doc.qt.io/qt-6/signalsandslots.html" target="_blank" rel="noopener noreferrer nofollow ugc">documentation</a>.</p>
<p dir="auto">That said,  there's nothing wrong in having slots in your QMainWindow subclass. Just beware of not making it a god class that does anything and everything in your application. You must take the time to create a sane architecture for your application.</p>
]]></description><link>https://forum.qt.io/post/832247</link><guid isPermaLink="true">https://forum.qt.io/post/832247</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 30 Sep 2025 16:04:18 GMT</pubDate></item></channel></rss>