I have two pyqt files that I made in qt4 designer. I put them both in a directory and created a  file outside the directory, which I imported them with. The first file is a window with a button, that when clicked, should close the first window, and open the second window. 
I can import them, and launch them both at the same time, but I can't figure out how to have the button in the first window affect the other, yet alone have it close itself and spawn the other.
In the handler of the button-click in the first window, instantiate the second window and invoke its show-method, and then close (emit the close-signal to) the first window.
How to tie two windows together in pyqt4