136 @param painter reference to the painter object (QPainter) |
136 @param painter reference to the painter object (QPainter) |
137 @param option style options (QStyleOptionGraphicsItem) |
137 @param option style options (QStyleOptionGraphicsItem) |
138 @param widget optional reference to the widget painted on (QWidget) |
138 @param widget optional reference to the widget painted on (QWidget) |
139 """ |
139 """ |
140 pen = self.pen() |
140 pen = self.pen() |
141 if (option.state & QStyle.State_Selected) == \ |
141 if ( |
142 QStyle.State(QStyle.State_Selected): |
142 (option.state & QStyle.State_Selected) == |
|
143 QStyle.State(QStyle.State_Selected) |
|
144 ): |
143 pen.setWidth(2) |
145 pen.setWidth(2) |
144 else: |
146 else: |
145 pen.setWidth(1) |
147 pen.setWidth(1) |
146 |
148 |
147 painter.setPen(pen) |
149 painter.setPen(pen) |