155 @param painter reference to the painter object (QPainter) |
155 @param painter reference to the painter object (QPainter) |
156 @param option style options (QStyleOptionGraphicsItem) |
156 @param option style options (QStyleOptionGraphicsItem) |
157 @param widget optional reference to the widget painted on (QWidget) |
157 @param widget optional reference to the widget painted on (QWidget) |
158 """ |
158 """ |
159 pen = self.pen() |
159 pen = self.pen() |
160 if (option.state & QStyle.State_Selected) == \ |
160 if ( |
161 QStyle.State(QStyle.State_Selected): |
161 (option.state & QStyle.State_Selected) == |
|
162 QStyle.State(QStyle.State_Selected) |
|
163 ): |
162 pen.setWidth(2) |
164 pen.setWidth(2) |
163 else: |
165 else: |
164 pen.setWidth(1) |
166 pen.setWidth(1) |
165 |
167 |
166 offsetX = self.rect().x() |
168 offsetX = self.rect().x() |