[PyQt] QTableWidget Desperation!

Lawrence Shafer detroit371 at gmail.com
Sat Nov 24 04:44:26 GMT 2007


I am trying to get the QTableWidget figured out. So far, adding data to 
the cells doesn't seem straightforward. I can't seem to find a good 
solid example that is simple, maybe because it's not simple! This is 
what I have so far, can you just give me an example of how to put simple 
text into  one cell??? I really don't want to have to mess with what 
seems to be the complicated way the ships-dict example from marks book 
does it. I just need something super-simplified!

Many Thanks!

Lawrence


working code so far,
=======================
    def updateTable(self):
        self.tableWidget.showGrid()
        self.tableWidget.setRowCount(20)
        self.tableWidget.setColumnCount(7)
        headers=["Start Time", "Stop Time", "Total Time", "Hourly Rate", 
"Parts", "Total $", "Notes"]
        self.tableWidget.setHorizontalHeaderLabels(headers)



More information about the PyQt mailing list