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    [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde

Reply via email to