Quote Originally Posted by aladagemre View Post
An example portion of code from my own (click event for New User button):
Qt Code:
  1. def slotUserNew(self):
  2. self.userDialog = QtGui.QDialog(self)
  3. self.userDialog.ui = UserDialog(self) # caller=self, just if you wanted to call main dialog from the sub-dialog.
  4. self.userDialog.ui.show()
To copy to clipboard, switch view to plain text mode 

Ok, so I'm trying to understand how this code works. For the first line in the function, would "userDialog" be the object name of the main window that I am trying to open?

For line 2, would "userDialog.ui" be the name of the program that I am trying to open? What is the second "UserDialog(self)?"

If this helps, the object name of the window that I am trying to open is MainWindow and the object name of the dialog that is already open is Dialog2.

Sorry for all the questions, still very new to pyqt. Thank you.