Hi Yall,

I'm using a QTableView with a QStringListModel and can't seem to set the label text for the column in the table view. Heres the code:

Qt Code:
  1. QString lbl = "Some Text";
  2. QStringList my_list;
  3. my_list << "one" << "two" << "three";
  4. QStringListModel *pModel = new QStringListModel(my_list);
  5. pModel->setHeaderData(0, Qt::Horizontal, lbl);
  6. ui.inittabTable->setModel(pModel);
To copy to clipboard, switch view to plain text mode 

Where am I going wrong? No matter how I try, the header is always a "1".