def __init__(self, text='S', startp=Point(x=0.0, y=0.0),):
"""
Initialisation of the class.
"""
QGraphicsItem.__init__(self)
self.setFlag(QGraphicsItem.ItemIsSelectable, False)
self.text = text
self.sc = 1.0
self.startp = QtCore.QPointF(startp.x, -startp.y)
pencolor = QColor(0, 200, 255)
self.brush = QColor(0, 100, 255)
self.pen = QPen(pencolor, 1, QtCore.Qt.SolidLine)
self.pen.setCosmetic(True)
self.path = QPainterPath()
self.path.addText(QtCore.QPointF(0, 0),
QFont("Arial", 10/self.sc),
self.text)
评论列表
文章目录