Created
July 17, 2012 20:54
-
-
Save fmorency/3132006 to your computer and use it in GitHub Desktop.
PySide bug?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Traceback (most recent call last): | |
# File "example.py", line 57, in <module> | |
# root.appendRow(list(p)) | |
#TypeError: 'PySide.QtGui.QStandardItem.appendRow' called with wrong argument types: | |
# PySide.QtGui.QStandardItem.appendRow(list) | |
#Supported signatures: | |
# PySide.QtGui.QStandardItem.appendRow(PySide.QtGui.QStandardItem) | |
# PySide.QtGui.QStandardItem.appendRow(list) | |
if __name__ == '__main__': | |
app = QApplication(sys.argv) | |
properties = ['Intensity', 'Brightness', 'Name'] | |
params = [10, 70.1, 'Charles'] | |
pairs = zip(properties, params) | |
model = QStandardItemModel(4,2) | |
view = QTreeView() | |
view.setModel(model) | |
root = model.invisibleRootItem() | |
for p in pairs: | |
root.appendRow(list(p)) | |
view.show() | |
app.exec_() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment