PDA

View Full Version : QTableWidget custom header labels



migel
1st June 2011, 09:16
I am trying to put labels instead of default labels, but this does not work for me, still seeing the numbers instead.


QStringList headerLabels;
headerLabels << "Title" << "Genre" << "Artist" << "Rating";
this->setHorizontalHeaderLabels(headerLabels);
this->resizeColumnsToContents();
this->setColumnCount(4);


example from:
http://doc.qt.nokia.com/latest/itemviews-stardelegate.html

wysota
1st June 2011, 09:20
Set column count first and then set the labels.