MainWindow.py 530 Bytes
Newer Older
Pedro Henrique Kopper's avatar
Pedro Henrique Kopper committed
1
2
import sys
from PyQt5 import QtWidgets
Pedro Henrique Kopper's avatar
Pedro Henrique Kopper committed
3
4
from ui.CalibracaoPressaoW import Ui_CalibracaoPressaoW
from threads.MainThread import MainThread
Pedro Henrique Kopper's avatar
Pedro Henrique Kopper committed
5
6
7
8
9
10
11
12
13
14
15

class Ui_MainWindow(object):

    def __init__(self):

        self.app = QtWidgets.QApplication(sys.argv)
        self.dialog = QtWidgets.QMainWindow()

        self.ui = Ui_CalibracaoPressaoW()
        self.ui.setupUi(self.dialog)

Pedro Henrique Kopper's avatar
Pedro Henrique Kopper committed
16
17
18
19
        main_thread = MainThread(self.ui)
        main_thread.finished.connect(self.app.exit)
        main_thread.start()

Pedro Henrique Kopper's avatar
Pedro Henrique Kopper committed
20
        self.dialog.showMaximized()