试试这个: tableView->horizontalHeader()->setStretchLastSection(true); tableView->resizeColumnsToContents(); // not necessarily but can make look better