[PyQt] Problem using QTreeWidget.setModel on Windows XP.
Joon-Cheol Park
jooncheol at gmail.com
Fri Feb 8 23:58:32 GMT 2008
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
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080208/4e33dbce/attachment.html
More information about the PyQt
mailing list