更新固件时文件不匹配时进行提示

This commit is contained in:
luoliangyi 2022-11-29 18:42:43 +08:00
parent ba74212428
commit 898c4f5844
1 changed files with 8 additions and 1 deletions

View File

@ -381,9 +381,16 @@ void MainWindow::on_btnOpenFilePath_clicked()
}
else
{
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("firmware file mismatch"), QMessageBox::Yes, this);
QMessageBox msg(QMessageBox::Question, tr("tips"),
tr("firmware file mismatch, continue?"),
QMessageBox::Yes | QMessageBox::No, this);
msg.setButtonText(QMessageBox::Yes, tr("yes"));
msg.setButtonText(QMessageBox::No, tr("no"));
msg.exec();
if (msg.clickedButton() == msg.button(QMessageBox::Yes))
{
ui->editFilePath->setText(filePath);
}
}
}
}