<?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[Managing multiple windows]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/164216/parent-child-closing-windows-in-pyside6">Parent-child closing windows in pyside6</a><br />
Hi Mejias<br />
So am not sure on how your entire application flow structure / usecase occurs, but here's what i have:</p>
<ul>
<li>if a user logins through LoginApp , on success opens MainMenu followed by the rest of the Windows (QWidget). In my case , this is what i have been using:</li>
</ul>
<pre><code>class MainMenu(QWidget):
      super().__init__()
      def __init__(self):
           # declare class attributes/variables that hold the application other windows
          self.mainTreeMenu = None
         # when a user performs an operation, e.g clicks a button set the instance of KsecOption or RoleMainWindow ..e.tc. to class variable
         self.mainTreeMenu = MainTreeMenu()
         self.mainTreeMenu.show()
</code></pre>
<p dir="auto">To improve your application</p>
<ul>
<li>add a condition statement to always check if the application window is open and not <code>None</code>.</li>
<li>setup a custom Signal emitter from your child window, which is then picked up by  a slot(method) connected to that signal.</li>
</ul>
]]></description><link>https://forum.qt.io/topic/165230/managing-multiple-windows</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 15:47:37 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/165230.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 01 Nov 2026 16:31:59 GMT</pubDate><ttl>60</ttl></channel></rss>