def spawn(cfg): 'Spawn the Application' pxcfg = here + 'z-data_/launch.yaml' spawnCFG = config.instruct(pxcfg).load() #override(cfg) app = QApplication(sys.argv) # ||Start the App Container aw = gui.mainWindow() # || aw.show() sys.exit(app.exec_())
def app_exec(timeout=1000): debugon() from PySide.QtCore import QTimer from Qt5.QtWidgets import QApplication app = QApplication(sys.argv) QTimer.singleShot(timeout, app.quit) return app.exec_()
pass def load_from_database(self): try: members = list(self.rec.find()) for member in members: id = member['id'] name = member['name'] title = member['title'] company = member['company'] activity_field = member['activity field'] email = member['email'] phone = member['phone'] mobile = member['mobile'] fax = member['fax'] address = member['address'] new_member = Member(id, name, title, company, activity_field, email, phone, mobile, fax, address) self.members.append(new_member) except: pass if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) start = Start() sys.exit(app.exec_())
def exit(self): sys.exit(app.exec_())