[SOLVED] Change initial number of QTableView Vertical Header
General and Desktop
5
Posts
2
Posters
1.7k
Views
1
Watching
-
wrote on 12 Jun 2014, 13:55 last edited by
Hello all
I need to change the initial number of a QTableView vertical header to start with 0, not with 1
How can I do that?
Thanks
-
Hi,
You can subclass QHeaderView and set on your QTableView
-
wrote on 17 Jun 2014, 13:02 last edited by
Solved
@
for(int i = 0; i < modelo->rowCount(); i++)
{
modelo->setHeaderData(i, Qt::Vertical, i);
}
@ -
Indeed, it's way simpler :) I've over engineered your problem :D
-
wrote on 17 Jun 2014, 16:47 last edited by
No problem. By the way, thanks for your replies. Its a very good help.
Cheers
1/5