添加自动调整列宽

This commit is contained in:
0x504B0304 2022-02-13 10:07:54 +00:00 committed by Gitee
parent 0969c1d5ce
commit ce056f5308
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 0 deletions

View File

@ -383,6 +383,7 @@ void MainWindow::redrawTable()
}
int lastRow=varList.size();
tableModel->setItem(lastRow,0,new QStandardItem(""));//末尾添加空行,用于用户添加变量
ui->tb_var->resizeColumnsToContents();//根据表格内容自动调整列宽
}
//保存配置到指定路径的文件