How to set the width of a column on QTableWidget
General and Desktop
4
Posts
2
Posters
10.5k
Views
1
Watching
-
I solved my trouble with this code:
@
//configure the rows and the columns on the table
ui->stepsViewer->setColumnCount(5);
ui->stepsViewer->setColumnWidth(0, 80);
ui->stepsViewer->setColumnWidth(1, 80);
ui->stepsViewer->setColumnWidth(2, 150);
ui->stepsViewer->setColumnWidth(3, 150);
//ui->stepsViewer->setColumnWidth(4, 250);
ui->stepsViewer->horizontalHeader()->setStretchLastSection(true);
@