class ChatApp(mp.Process): def __init__(self, model, jid): super(ChatApp, self).__init__() self.win = ChatWindow(model, jid) def run(self): app = QtWidgets.QApplication([]) self.win.show() app.exec_()
def showChatWindow(self, jid, loadMessages=False): if jid not in self.chatWindowManager: w = ChatWindow(model=self.createModel(jid, loadMessages), jid=jid) w.requestClose.connect(self.onChatWindowClose) w.setContextProperty("commonManager", commonManager) self.chatWindowManager[jid] = w w.showCenter() else: self.chatWindowManager[jid].raise_()
def __init__(self, model, jid): super(ChatApp, self).__init__() self.win = ChatWindow(model, jid)