The following code should close the current file and open it again. Instead, it keeps opening only new windows.
Does anybody have a hint for keeping the old window clos
You seem to have put self.close() in the wrong place. Also, you should not use subprocess.call, as it will block until the command completes. It's better to use QProcess instead:
def run(self, path):
QtCore.QProcess.startDetached('python', [path])
self.close()
def initUI(self):
self.btn_newSearch = QtGui.QPushButton('Start', self)
...