Skip to content
Snippets Groups Projects
Commit 14c02540 authored by Garrett Bates's avatar Garrett Bates
Browse files

Added main UI file.

parent 5e552084
No related branches found
No related tags found
1 merge request!3Main UI and miscellaneous associated widgets
import os.path
from PySide2.QtUiTools import QUiLoader
from PySide2.QtCore import QFile, QIODevice
def load_main_ui(base_path=''):
file_name = os.path.join(base_path, 'main.ui')
ui_file = QFile(file_name)
if not ui_file.open(QFile.ReadOnly):
print(f'cannot open {file_name}', ui_file.errorString())
loader = QUiLoader()
window = loader.load(ui_file)
ui_file.close()
if not window:
print(loader.errorString())
return window
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment