[PyQt] do set hints work QStandardItem?
Matt Chambers
chambers at imageworks.com
Fri May 4 20:14:42 BST 2007
using qt 4.2.2, pyqt 4.1.
some example code, it acts like a qstandarditem which contains an array
with the entire row inside. No matter
what I do to the size hint, the column size always starts out way to
small to display the data. Height, apparently
does work, its width that seems to have no effect.
class Group(QtGui.QStandardItem):
def __init__(self,element):
label = label = "%-4s/ %-4s" % (0,0);
QtGui.QStandardItem.__init__(self,label)
self.__element = element
size = QtCore.QSize(400,-1)
self.setSizeHint(size)
print self.sizeHint().width()
self.items = [self]
self.items.append(QtGui.QStandardItem(""))
self.items.append(QtGui.QStandardItem(element.get("name")))
Thanks
-Matt
More information about the PyQt
mailing list