1. 程式人生 > >QTableWidget行高列寬自適應

QTableWidget行高列寬自適應

    ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
    ui->tableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::Stretch);