def __init__(self, parent=None): super(MainWindow, self).__init__(parent) # toolbox self.createToolBox() # view & scene self.scene = Scene(self) self.view = QGraphicsView(self.scene) self.view.setAcceptDrops(True) # layout layout = QHBoxLayout() layout.addWidget(self.toolBox) layout.addWidget(self.view) widget = QWidget() widget.setLayout(layout) self.setCentralWidget(widget) # consoles' communication thread import communication from communication import Thread import comm_rpyc self.thread = Thread() communication.thread = self.thread communication.wnd = self self.thread.dataReceived.connect(self.dataReceived) self.thread.start()