9

Simple as that, I've been searching for hours without finding a solution. I have a QTableView connected to a QStandardItemModel and I just want to change the name it the QTableView headers. Now there is just 1, 2, 3, and so on.

AAEM
  • 1,837
  • 2
  • 18
  • 26
  • You mean titles of columns? Why are you using QStandardItemModel? Wouldn't it be better to use/inherit QAbstractTableModel (it has header as an argument in constructor) – Wookie88 Jul 04 '13 at 22:55

1 Answers1

20

QStandardItemModel::setHorizontalHeaderLabels is probably what you need.

Eugene
  • 7,180
  • 1
  • 29
  • 36