On Friday 08 February 2008, Joon-Cheol Park wrote: > Hello, > > I am using PyQt on Windows XP and Ubuntu. > My environment is python 2.5 and Qt4.3.3 OpenSource Edition and PyQt GPL > 4.3.3. > > I found an unexpected behaviour in Window XP. > This code is Okay in Ubuntu. > > code: > class PluginSettingDialog(QtGui.QDialog): > def __init__(self, parent=None): > QtGui.QDialog.__init__(self, parent) > self.ui = Ui_PluginSettingDialog() > self.ui.setupUi(self) > ... > self.ui.treeWidget.setEditTriggers( > QtGui.QAbstractItemView.NoEditTriggers) > self.ui.treeWidget.setRootIsDecorated(False) > self.ui.treeWidget.setAlternatingRowColors(True) > self.ui.treeWidget.setModel(self.createModel()) > > > $ /cygdrive/c/Python25/python pluginsetting.py > ... > Traceback (most recent call last): > File "pluginsetting.py", line 86, in <module> > dialog = PluginSettingDialog() > File "pluginsetting.py", line 24, in __init__ > self.ui.treeWidget.setModel(self.createModel()) > AttributeError: QTreeWidget.setModel is a private method
That's the correct behaviour. If it "works" under Ubuntu then it's not the version you think it is. Phil _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
