1. 设置表头背景颜色
ui->tableWidget->horizontalHeader()->setStyleSheet("QHeaderView::section{background-color:skyblue}");
2. 设置表格列拉伸
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
1. 设置表头背景颜色
ui->tableWidget->horizontalHeader()->setStyleSheet("QHeaderView::section{background-color:skyblue}");
2. 设置表格列拉伸
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);