完成设置保存功能

This commit is contained in:
gfdgd xi 2023-04-19 21:02:24 +08:00
parent 620cea5136
commit 603d7a3827

View File

@ -88,6 +88,12 @@ void QemuSetting::on_save_clicked()
object.insert("VNC", ui->vncNumber->value());
object.insert("CPU", ui->cpuNumber->value());
qDebug() << QJsonDocument(object).toJson();
// 读取配置文件
QFile file(QDir::homePath() + "/.config/deepin-wine-runner/QemuSetting.json");
file.open(QIODevice::WriteOnly);
file.write(QJsonDocument(object).toJson());
file.close();
QMessageBox::information(this, "提示", "保存完成!");
}
void QemuSetting::on_cancel_clicked()