def get_ui_class(ui_file):
"""Get UI Python class from .ui file.
:param ui_file: The file of the ui in safe.gui.ui
:type ui_file: str
"""
ui_file_path = os.path.abspath(
os.path.join(
os.path.dirname(__file__),
os.pardir,
'gui',
'ui',
ui_file
)
)
return uic.loadUiType(ui_file_path)[0]
评论列表
文章目录