From ac1f24ec77010b0080267864a33ee903f16db050 Mon Sep 17 00:00:00 2001 From: p-state <18659798+p-state@users.noreply.github.com> Date: Thu, 12 Mar 2020 20:38:08 +0300 Subject: [PATCH] Fix window is not in full screen mode after closing the app (#202) --- UEFITool/uefitool.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UEFITool/uefitool.cpp b/UEFITool/uefitool.cpp index c3d0ff9..dba2bd5 100644 --- a/UEFITool/uefitool.cpp +++ b/UEFITool/uefitool.cpp @@ -885,8 +885,8 @@ void UEFITool::contextMenuEvent(QContextMenuEvent* event) void UEFITool::readSettings() { QSettings settings(this); - resize(settings.value("mainWindow/size", QSize(800, 600)).toSize()); - move(settings.value("mainWindow/position", QPoint(0, 0)).toPoint()); + restoreGeometry(settings.value("mainWindow/geometry").toByteArray()); + restoreState(settings.value("mainWindow/windowState").toByteArray()); QList horList, vertList; horList.append(settings.value("mainWindow/treeWidth", 600).toInt()); horList.append(settings.value("mainWindow/infoWidth", 180).toInt()); @@ -932,8 +932,8 @@ void UEFITool::readSettings() void UEFITool::writeSettings() { QSettings settings(this); - settings.setValue("mainWindow/size", size()); - settings.setValue("mainWindow/position", pos()); + settings.setValue("mainWindow/geometry", saveGeometry()); + settings.setValue("mainWindow/windowState", saveState()); settings.setValue("mainWindow/treeWidth", ui->structureGroupBox->width()); settings.setValue("mainWindow/infoWidth", ui->infoGroupBox->width()); settings.setValue("mainWindow/treeHeight", ui->structureGroupBox->height());