def _show_label_and_restarter(self, label_text): print "Should show a label and restarter by the time you read this." self.deleteAllItems() print "Label text is %s" % (label_text, ) label = QLabel(label_text, self) restartb = QPushButton("Restart", self) #TODO add slot and socket stuff. print type(self.layout) xpos = 0 ypos = 0 self.layout.addWidget(label, xpos, ypos) label.show() xpos += 1 self.layout.addWidget(restartb, xpos, ypos) restartb.show() xpos += 1 self.repaint() print "Widget added."