I'm trying to add a QLabel
to a QTreeWidgetItem
but Python crashes on the setItemWidget
call.
Any ideas why it crashes?
Here is the code:
from PySide import QtCore, QtGui
view = QtGui.QTreeWidget()
view.show()
newItem = QtGui.QTreeWidgetItem(view)
view.setItemWidget(newItem,0,QtGui.QLabel('abc'))