title: Reload UI, Rather Than Recreating
body: <pre><code>import sys
  import webbrowser
  import hou
  from PySide2 import QtCore, QtUiTools, QtWidgets, QtGui
  
  # Calling UI File &amp; Some Modification
  class someWidget(QtWidgets.QWidget):
      def __init__(self):
          super(someWidget,self).__init__()
          ui_file = 'C:/Users/XY_Ab/Documents/houdini18.5/Folder_CGI/someUI.ui'
          self.ui = QtUiTools.QUiLoader().load(ui_file, parentWidget=self)
          self.setParent(hou.qt.mainWindow(), QtCore.Qt.Window)
          self.setFixedSize(437, 42)
          self.setWindowTitle(&quot;Requesting For Help&quot;)
  
  window_C = someWidget()
  window_C.show()
  </code></pre>
  <p>So, I have created this small script that shows the UI, I have connected this to Houdini Menu Bar. Now The Problem is if I click the menu item multiple times it will create another instance of the same UI &amp; the previous one stays back, What I want is something called &quot;If Window Exist Delete It, Crate New One&quot; sort of thing.
  Can someone guide me? I am fairly new to python in Houdini and Qt so a little explanation will be hugely helpful. Also, why can't I use from PySide6 import?? Why do I have to use from PySide2?? Because otherwise Houdini is throwing errors.</p>
  <p>For the same thing what used to do in maya is</p>
  <pre><code># Check To See If Window Exists
  if cmds.window(winID, exists=True):
      cmds.deleteUI(winID)
  </code></pre>
  <p>Trying to do the same thing inside Houdini.</p>