From 8a362b054817c20ac2691bf4d8af67537df84c6c Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Wed, 24 Apr 2024 21:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=86=85=E6=A0=B8=E7=BC=96?= =?UTF-8?q?=E5=8F=B7=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 2122c90..9da3606 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -62,8 +62,11 @@ void MainWindow::on_m_installButton_clicked() QMessageBox::critical(this, tr("Error"), tr("Nothing to choose")); return; } + // 获取 ID + QModelIndex index = ui->m_kernelShow->model()->index(row, 0); + int id = ui->m_kernelShow->model()->data(index).toUInt(); // 获取选中行 - KernelInstaller *installer = new KernelInstaller(kernelInformation->get_pkgName(row)); + KernelInstaller *installer = new KernelInstaller(kernelInformation->get_pkgName(id)); installer->show(); }