def text_item(self): """return a canvas item for the text in the foreground""" item = QtWidgets.QGraphicsTextItem() f = item.font() f.setPointSize(7) item.setFont(f) self._set_text(item) return item
def text_item(self): """return a canvas item for the text in the foreground""" return QtWidgets.QGraphicsTextItem(self.get_text())