I have Qdialog with that I open from main window:
Dialog = myDialog(self)
Here is the code from new opened Dialog:
class myDialog(QtGui.QDialog, Ui_DialogCalibration):
def __init__(self, parent=None):
super(myDialog, self).__init__(parent)
self.setupUi(self)
How can pass parameter(lint) from main window to this new window, something like
Dialog = myDialog(self, listInformation)
and then in myDialog class use that list
Then, when you go to create the
myDialog, you can add the list as a parameter. When you need to use it inside of yourmyDialog, you would access it asself.listInfo.EDIT: To further expand on the comments:
If you have
def __init__(self, parent=None, listInfo=None), you would call it asDialog = myDialog(parent=self, listInfo=listInfo). If you had it asdef __init__(self, parent, listInfo)you would doDialog = myDialog(self, listInfo). Hopefully you see the pattern here.