How to set the width of a column on QTableWidget

  • Hi guys,

    I'd like to set a specific width for a column of the QTableWidget I'm using on my GUI. How can I do that?

  • @void QTableWidget::setColumnWidth ( int column, int width ) @
    isn't help?

  • I solved my trouble with this code:

    //configure the rows and the columns on the table
    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);

  • thanks for your interest in this matter @qxoz.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.