[PyKDE] PyQt4 and QTableWidget subclassing
bastian salmela
basse at kulma.org
Thu May 4 15:21:04 BST 2006
hi,
I am trying to do a sub class from QTableWidget, and I had this similar
working with pyqt3 but now with pyqt4 table never shows cell structure or
contents.. all I get is white table background.
maybe I am missing something obvious here?
here's a snippet of test code:
-----
class testTable(QtGui.QTableWidget):
def __init__(self, parent):
QtGui.QTableWidget.__init__(self, parent)
self.setRowCount(10)
self.setColumnCount(10)
self.setHorizontalHeaderLabels(['test', 'test'])
for r in range(self.rowCount()):
for c in range(self.columnCount()):
item = QtGui.QTableWidgetItem("test")
self.setItem(r, c, item)
self.show()
------
thanks!
kulma.org -- the works
More information about the PyQt
mailing list