Add parent
to ArrowItem's constructor signature
This commit is contained in:
parent
52717fa8b7
commit
3d391d46e3
@ -11,13 +11,13 @@ class ArrowItem(QtGui.QGraphicsPathItem):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, **opts):
|
def __init__(self, parent=None, **opts):
|
||||||
"""
|
"""
|
||||||
Arrows can be initialized with any keyword arguments accepted by
|
Arrows can be initialized with any keyword arguments accepted by
|
||||||
the setStyle() method.
|
the setStyle() method.
|
||||||
"""
|
"""
|
||||||
self.opts = {}
|
self.opts = {}
|
||||||
QtGui.QGraphicsPathItem.__init__(self, opts.pop('parent', None))
|
QtGui.QGraphicsPathItem.__init__(self, parent)
|
||||||
|
|
||||||
if 'size' in opts:
|
if 'size' in opts:
|
||||||
opts['headLen'] = opts['size']
|
opts['headLen'] = opts['size']
|
||||||
|
Loading…
Reference in New Issue
Block a user