chore:给关闭窗口添加询问事件

This commit is contained in:
2025-09-12 23:18:17 +08:00
parent 84c5897d9b
commit a78ee36ae7
2 changed files with 7 additions and 0 deletions

View File

@@ -261,7 +261,11 @@ void MainWindow::runAptssUpgrade()
QMessageBox::warning(this, "升级失败", "执行 sudo aptss ssupdate 失败,请检查系统环境或稍后再试。");
}
}
void MainWindow::closeEvent(QCloseEvent *event)
{
QMessageBox::StandardButton reply = QMessageBox::question(this, "确认关闭", "正在更新,是否确认关闭窗口?", QMessageBox::Yes | QMessageBox::No);
}
MainWindow::~MainWindow()
{
delete ui;