122 @param option style options (QStyleOptionGraphicsItem) |
122 @param option style options (QStyleOptionGraphicsItem) |
123 @param widget optional reference to the widget painted on (QWidget) |
123 @param widget optional reference to the widget painted on (QWidget) |
124 """ |
124 """ |
125 width = 2 if ( |
125 width = 2 if ( |
126 (option.state & QStyle.StateFlag.State_Selected) == |
126 (option.state & QStyle.StateFlag.State_Selected) == |
127 QStyle.State(QStyle.StateFlag.State_Selected) |
127 QStyle.StateFlag.State_Selected |
128 ) else 1 |
128 ) else 1 |
129 |
129 |
130 # draw the line first |
130 # draw the line first |
131 line = QLineF(self._origin, self._end) |
131 line = QLineF(self._origin, self._end) |
132 painter.setPen( |
132 painter.setPen( |