forked from chrisevans3d/poseWrangler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_window.py
33 lines (21 loc) · 818 Bytes
/
ui_window.py
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
30
31
32
33
from PySide2 import QtWidgets
import ui_widget
class UIWindow( QtWidgets.QMainWindow, ui_widget.UIWidget ):
#UI name that to find the UI instance - used in showUI()
ui_name = "window"
def __init__(self, parent=None):
super(UIWindow, self).__init__(parent)
def setupUi(self, window):
super(UIWindow, self).setupUi(window)
def show(self):
super(UIWindow, self).show()
def showEvent(self, event):
"""show event"""
super(UIWindow, self).showEvent(event)
def closeEvent(self, event):
"""called when the UI is closed"""
#gets called on cleanup
self.cleanupOnClose()
def cleanupOnClose(self):
"""implement any cleaup code here"""
print("cleaning up on close")