[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] QTableWidget Desperation!
From: Lawrence Shafer <detroit371 () gmail ! com>
Date: 2007-11-24 5:01:10
Message-ID: 4747B016.4000209 () gmail ! com
[Download RAW message or body]
OK, I'm a total ID10T! Two more lines did it! just when you give up
after 3 hrs of struggle, it all comes together!
Sorry!
additional code;
========================
item = QtGui.QTableWidgetItem("simple text")
self.tableWidget.setItem(0, 0, item)
Lawrence Shafer wrote:
> 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)
>
> _______________________________________________
> PyQt mailing list PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic