-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
29 lines (23 loc) · 782 Bytes
/
app.py
File metadata and controls
29 lines (23 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
Neon Soccer GUI Application
Starts main window's thread
"""
import threading
import sys
from PyQt6.QtCore import Qt
from main_window import MainWindow
from PyQt6.QtWidgets import QApplication
class App(threading.Thread):
def __init__(self, gui):
QApplication.setAttribute(Qt.ApplicationAttribute.AA_UseDesktopOpenGL)
self.gui = gui
self.app = QApplication(sys.argv)
screen_size = self.app.primaryScreen().size() # See QScreen class
screen_width = screen_size.width()
screen_height = screen_size.height()
self.window = MainWindow(gui.match, screen_width, screen_height)
def start(self):
# Show application's GUI
self.window.show()
# self.window.showMaximized()
self.app.exec()