eric6/E5Graphics/E5ArrowItem.py

changeset 8257
28146736bbfc
parent 8218
7c09585bd960
child 8268
6b8128e0c9d1
equal deleted inserted replaced
8256:26a8b92aeabd 8257:28146736bbfc
114 114
115 @param painter reference to the painter object (QPainter) 115 @param painter reference to the painter object (QPainter)
116 @param option style options (QStyleOptionGraphicsItem) 116 @param option style options (QStyleOptionGraphicsItem)
117 @param widget optional reference to the widget painted on (QWidget) 117 @param widget optional reference to the widget painted on (QWidget)
118 """ 118 """
119 if ( 119 width = 2 if (
120 (option.state & QStyle.StateFlag.State_Selected) == 120 (option.state & QStyle.StateFlag.State_Selected) ==
121 QStyle.State(QStyle.StateFlag.State_Selected) 121 QStyle.State(QStyle.StateFlag.State_Selected)
122 ): 122 ) else 1
123 width = 2
124 else:
125 width = 1
126 123
127 # draw the line first 124 # draw the line first
128 line = QLineF(self._origin, self._end) 125 line = QLineF(self._origin, self._end)
129 painter.setPen( 126 painter.setPen(
130 QPen(self._colors[0], width, Qt.PenStyle.SolidLine, 127 QPen(self._colors[0], width, Qt.PenStyle.SolidLine,

eric ide

mercurial