PDA

View Full Version : QTreeView Headers not displaying properley.



jigglyslime
31st October 2013, 06:33
Hey guys,

Ok so my problem here is that, i have a tree view in my program but it won't show the headers i set in the model.

Here is the model code whihc sets the headers:

QStringList Headers;
Headers.append(QString("Name"));
Headers.append(QString("Progress"));
Headers.append(QString("Rating"));
Headers.append(QString("Type"));
//Headers << "Name" << "Progress" << "Rating" << "Type";

DataModel->setHorizontalHeaderLabels(Headers);

and here is what i get when i run the program:9740

any ideas why?

Also for some reason i cannot resize the columns programatically aswell

jigglyslime
1st November 2013, 03:13
Ok i found the solution, the problem was that i was clearing the data model so i had to set the headers again