diff -r 27f636beebad -r 2c730d5fd177 eric6/E5Graphics/E5ArrowItem.py --- a/eric6/E5Graphics/E5ArrowItem.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/E5Graphics/E5ArrowItem.py Tue Mar 02 17:17:09 2021 +0100 @@ -51,14 +51,15 @@ self._type = arrowType if colors is None: - self._colors = (QColor(Qt.black), QColor(Qt.white)) + self._colors = (QColor(Qt.GlobalColor.black), + QColor(Qt.GlobalColor.white)) else: self._colors = colors self._halfLength = 13.0 - self.setFlag(QGraphicsItem.ItemIsMovable, True) - self.setFlag(QGraphicsItem.ItemIsSelectable, True) + self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIsMovable, True) + self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIsSelectable, True) def setPoints(self, xa, ya, xb, yb): """ @@ -116,8 +117,8 @@ @param widget optional reference to the widget painted on (QWidget) """ if ( - (option.state & QStyle.State_Selected) == - QStyle.State(QStyle.State_Selected) + (option.state & QStyle.StateFlag.State_Selected) == + QStyle.State(QStyle.StateFlag.State_Selected) ): width = 2 else: @@ -126,8 +127,8 @@ # draw the line first line = QLineF(self._origin, self._end) painter.setPen( - QPen(self._colors[0], width, Qt.SolidLine, Qt.FlatCap, - Qt.MiterJoin)) + QPen(self._colors[0], width, Qt.PenStyle.SolidLine, + Qt.PenCapStyle.FlatCap, Qt.PenJoinStyle.MiterJoin)) painter.drawLine(line) # draw the arrow head