I've found it. The code should look like this:
Qt Code:
... ui->tableWidget->setItem(0, 0, item); show(); // show the widget so the last column can be resized and the next function will have a proper column size ui->tableWidget->resizeRowsToContents(); ...To copy to clipboard, switch view to plain text mode
Bookmarks