Reputation: 391
Is there a way to get QTableWidget's column label value? The inverse of setHorizontalHeaderLabels(QString) in Qt and the equivalent of GetColLabelValue (int col) wxWidgets: I'm looking for a long time in the Qt documentation but could not find the command I need
Upvotes: 1
Views: 7564
Reputation: 383
Assuming your QTableWidget is named table, and you want from column index columnID:
QString str = table.horizontalHeaderItem(columnID)->text();
Upvotes: 7