I\'ve created two windows using qt4 designer, and would like to link them together. I put them both in a folder and created a file outside the directory, which I\'m importing th
Your question don't show much context but it seems you are new at PyQt and PyUIC tools.
That you post aren't (or not should be) the real windows of your app. Those class are generated for pyuic or pyuic4.
You must have something like:
class RealWindow(QMainWindow):
def __init__(parent=None):
super(RealWindow, self).__init__(parent) # Call QMainWindow constructor.
self.__ui = UI_MainWindow() # Here is when you should use that class.
self.__ui.setupUI(self) # And apply the properties to yout actual window
def on_some_button_clicked(*args, **args) # And here is where you do whatever you want to do when you press a button.
On the other hand, I'm not sure is a good idea having two main windows in the same app. I don't know even if Qt allow that at all.
I recommend you build one of your windows as a QDialog. Or build a single window with a set of controls you can hide or show at will.
I also recommend you: a pyqt tutorial