Start window maximized

This commit is contained in:
Khopa 2019-11-21 19:55:03 +01:00
parent a25a0031ff
commit 7d524300e5
2 changed files with 8 additions and 2 deletions

View File

@ -56,7 +56,7 @@ if __name__ == "__main__":
# Start window
window = QLiberationWindow()
window.show()
window.showMaximized()
splash.finish(window)
sys.exit(app.exec_())

View File

@ -1,7 +1,9 @@
import webbrowser
from PySide2 import QtGui
from PySide2.QtCore import Qt
from PySide2.QtGui import QIcon
from PySide2.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, QMainWindow, QAction, QMessageBox
from PySide2.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, QMainWindow, QAction, QMessageBox, QDesktopWidget
import qt_ui.uiconstants as CONST
from game import Game
@ -33,6 +35,10 @@ class QLiberationWindow(QMainWindow):
self.connectSignals()
self.onGameGenerated(self.game)
screen = QDesktopWidget().screenGeometry()
self.setGeometry(0, 0, screen.width(), screen.height())
self.setWindowState(Qt.WindowMaximized)
def initUi(self):