You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
706 B
27 lines
706 B
5 years ago
|
import os
|
||
|
|
||
|
from PyQt5 import QtWidgets, uic
|
||
|
|
||
|
class MainWindow(QtWidgets.QMainWindow):
|
||
|
"""
|
||
|
A wrapper class for handling creating a window based
|
||
|
on a Qt Designer *.ui file.
|
||
|
"""
|
||
|
|
||
|
# This file will always live in the root so we can yank
|
||
|
# the root directory from it's location safely.
|
||
|
__ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||
|
|
||
|
__UI_FILE_NAME = "clusterview.ui"
|
||
|
|
||
|
def __init__(self):
|
||
|
"""
|
||
|
Initializes and launches the UI in one shot.
|
||
|
"""
|
||
|
|
||
|
# Assumption: The UI file will be in the project root.
|
||
|
|
||
|
super(MainWindow, self).__init__()
|
||
|
uic.loadUi("{}/{}".format(self.__ROOT_DIR,self. __UI_FILE_NAME))
|
||
|
self.show()
|