[text] def main Create and run the database migrations if needed checkdb if Config.faker.enabled.value populatedb Open the main window app QApplication ui UiMainWindow window AppPeluui window.show app.aboutToQuit.connectlambda window.onclose app.exec Close the main window window.close I dont like this but I cant figure out the proper way 0s.killos.getpid signal9 if name main If its stupid but it works it aint stupid Processtargetmain.start