From f21a8f54470259736898bdb137c973a7a63999f3 Mon Sep 17 00:00:00 2001 From: HinGwenWoong Date: Wed, 19 Jan 2022 10:24:29 +0800 Subject: [PATCH] Set window maximized and window goes to the front when activate. --- PPOCRLabel/PPOCRLabel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index ee8baeb7..b1ccfc2f 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -101,6 +101,8 @@ class MainWindow(QMainWindow, WindowMixin): def __init__(self, lang="ch", gpu=False, defaultFilename=None, defaultPrefdefClassFile=None, defaultSaveDir=None): super(MainWindow, self).__init__() self.setWindowTitle(__appname__) + self.setWindowState(Qt.WindowMaximized) # set window max + self.activateWindow() # PPOCRLabel goes to the front when activate # Load setting in the main thread self.settings = Settings() -- GitLab