Hi, the thing is that i added a text editor to my app and it all works fine, except that when i try to go to another function/tool of the app it just doesn't work. The window sticks to the textEditor and i cant go anywhere else.

I know that it is because of this:

Qt Code:
  1. def openNotePad(self):
  2. self.textEdit = QtGui.QTextEdit()
  3. self.setCentralWidget(self.textEdit) #This line
To copy to clipboard, switch view to plain text mode 

So i tried to create a button that restores the app like it was before, a "Return" button, with this line:

Qt Code:
  1. self.setCentralWidget(Window()) #Goes to the original Window screen
To copy to clipboard, switch view to plain text mode 

But it initializes the app twice in the same window, and all the buttons are twice in the same location, like this: http://i.imgur.com/6zT9jO5.jpg

And i also tried with __init__ but it restarts in an other window. I thought that i could do "If the app is running two instances at the same time, then close one" but it would be an awful solution... How can I do this?