QGraphicsLineItem::paint() artifacts
问题 I have my own class which inherits from QGraphicsLineItem and overrides the paint() method to draw a thick line with an arrow head: void MyGraphicsItem::paint( QPainter* aPainter, const QStyleOptionGraphicsItem* aOption, QWidget* aWidget /*= nullptr*/ ) { Q_UNUSED( aOption ); Q_UNUSED( aWidget ); QLineF cLine = line(); aPainter->setPen( QPen( Qt::black, 6, Qt::SolidLine ) ); aPainter->drawLine( cLine ); qreal lineAngle = cLine.angle(); const qreal radius = 2.0; QLineF head1 = cLine; head1