I've basically just designed a quick UI in Qt Designer and converted it to python code. I can't find anywhere online on how to handle the closeEvent()
for the converted code that QtDesigner gives me with a class that inherits from object
. Any help would be appreciated.
Here is the set up code (Haven't included specific code for each GUI element as I don't think that should be necessasry... Just want to reduce clutter... Please let me know if you need the whole code):
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(789, 440)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
# more set up code...
def retranslateUi(self, MainWindow):
#translateUi stuff