82 p.setCapStyle(Qt.PenCapStyle.RoundCap) |
82 p.setCapStyle(Qt.PenCapStyle.RoundCap) |
83 p.setJoinStyle(Qt.PenJoinStyle.RoundJoin) |
83 p.setJoinStyle(Qt.PenJoinStyle.RoundJoin) |
84 |
84 |
85 self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIsMovable, True) |
85 self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIsMovable, True) |
86 self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIsSelectable, True) |
86 self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIsSelectable, True) |
87 try: |
87 self.setFlag( |
88 self.setFlag( |
88 QGraphicsItem.GraphicsItemFlag.ItemSendsGeometryChanges, True) |
89 QGraphicsItem.GraphicsItemFlag.ItemSendsGeometryChanges, True) |
|
90 except AttributeError: |
|
91 # only available for Qt 4.6.0 and newer |
|
92 pass |
|
93 |
89 |
94 def getName(self): |
90 def getName(self): |
95 """ |
91 """ |
96 Public method to retrieve the item name. |
92 Public method to retrieve the item name. |
97 |
93 |