表格支持自动调整行宽

This commit is contained in:
2024-05-12 09:09:02 +08:00
parent 90c04767ad
commit 20130363fb
8 changed files with 58 additions and 4 deletions

View File

@@ -58,6 +58,7 @@ void MainWindow::RefreshKernelListView(KernelInformation *info, bool showLocalAr
line++;
}
ui->m_kernelShow->setModel(model);
ui->m_kernelShow->resizeColumnsToContents();
}
MainWindow::~MainWindow()
@@ -160,3 +161,13 @@ void MainWindow::on_m_reconfigureButton_clicked()
installer->show();
}
void MainWindow::on_actionUpdate_apt_cache_triggered()
{
KernelInstaller *installer = new KernelInstaller(KernelInstaller::Option::Update, QStringList());
connect(installer, &KernelInstaller::InstallFinished, this, [this, installer](){
RefreshKernelList();
});
installer->show();
}