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:
QStringList my_list; my_list << "one" << "two" << "three"; pModel->setHeaderData(0, Qt::Horizontal, lbl); 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".
Bookmarks