PDA

View Full Version : Alteration in QTableWidget



hazardpeter
19th September 2009, 22:04
Hello. When I create a QTableWidget named table for exemple, the default name for the columns and rows are numbers. If we writte this:

table = new QTableWidget(2, 4);

Whe are going to have 2 rows, one named 1 and the other named 2. The same for the 4 columns one named 1, the other 2, etc..

What I would like to know is how can I change their name to put for example the 1º row (row 0) named "foo" and the 2º column (col 1) named "bar"?

wysota
20th September 2009, 00:09
QTableWidget::setHorizontalHeaderLabels()

hazardpeter
20th September 2009, 11:03
QTableWidget::setHorizontalHeaderLabels()

Oh so that it! Thanks for the answer!