184 @param painter reference to the painter object (QPainter) |
184 @param painter reference to the painter object (QPainter) |
185 @param option style options (QStyleOptionGraphicsItem) |
185 @param option style options (QStyleOptionGraphicsItem) |
186 @param widget optional reference to the widget painted on (QWidget) |
186 @param widget optional reference to the widget painted on (QWidget) |
187 """ |
187 """ |
188 pen = self.pen() |
188 pen = self.pen() |
189 if (option.state & QStyle.State_Selected) == \ |
189 if ( |
190 QStyle.State(QStyle.State_Selected): |
190 (option.state & QStyle.State_Selected) == |
|
191 QStyle.State(QStyle.State_Selected) |
|
192 ): |
191 pen.setWidth(2) |
193 pen.setWidth(2) |
192 else: |
194 else: |
193 pen.setWidth(1) |
195 pen.setWidth(1) |
194 |
196 |
195 painter.setPen(pen) |
197 painter.setPen(pen) |