[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] python qtable
From: Gordon Tyler <gordon () doxxx ! net>
Date: 2003-01-30 18:43:42
[Download RAW message or body]
Sandeep C wrote:
> I have a QTable in place, how do i dynamically add and delete data to
> the table?
self.tblTable.setItem(row, column, item)
Where item is an instance of QTableItem or one of its subclasses,
QComboTableItem and QCheckTableItem.
Or:
self.tblTable.setText(row, column, string)
Read the docs, it's all there: http://doc.trolltech.com/3.1/qtable.html
> Also how do i set the title of the columns?
self.tblTable.horizontalHeader().setLabel(index, title)
> def updateTableView(self,schema):
> header = self.tblTable.horizontalHeader()
> count = header.count()
> for i in range(count):
> header.removeLabel(i)
The line above should be: header.removeLabel(0)
Ciao,
Gordon
_______________________________________________
PyKDE mailing list PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic