[Solved] Setting size of QTableView Header
I have created a QTableView with QStandardItemModel. I have set the header as follows:
- QString headerlist ;
- headerlist << c1 << c12<< c123;
I want to set my header size on the basis of size of string in headerlist. E.g. here size of col1 is 2 , col2 is 3 …and so on….
Please suggest a way to do it. I see resizeSection() as one of the solutions. Is there any other way ?