PDA

View Full Version : pyside question pls help



sujan.dasmahapatra
12th July 2013, 10:44
I have a QMainWindow. There is one dialog which called on clicking menu. There is a QTreeWidget in the mainwindow. I want to pass that QTreeWidget to the dialog on invoking. Can I do that ?....Please check the snippet.
self.nvb is the QTreeWidget.
I am passing self.nvb to the ConfigDialog(self.models.values(), self.nvb, self)


def _setConfig(self):
dlg = ConfigDialog(self.models.values(), self.nvb, self)
if dlg.exec_()==QtGui.QDialog.Accepted:
pass


Now after passing this self.nvb I am trying to access the nvb



class ConfigDialog(QtGui.QDialog):
def __init__(self, models=[], config_nvb=None, parent=None):
super(ConfigDialog, self).__init__(parent)
nvb. // But when I am trying to access nvb none of elements are appearing in PyCharm.


When in the dialog I am trying to access nvb its elements are not coming. Please help.