Artifacts in QGraphicsView when moving QGraphicsObject
In creating a graphical editor, I use the possibility of selecting QGraphicsObjects and painting them differently when selected. To this end, I have added 8 dots to the painting of my QGraphicsObject which are positioned on its boundingRect. However, when moving a selected QGraphicsObject around by left-hand click and drag it over the canvas, I get these strange artifacts that I didn't have before I added the 8 dots. In an attempt to solve this, I tried increasing the size of the boundingRect to get the dots more inside it, but this approach didn't help. Is there a simple way to solve this issue? Not sure whether it related to this but I have used QGraphicsView::setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing).
Ok, I managed to solve it but drawing the additional dots not on the boundingRect but by drawing them 1 px within the bounds of the boundingRect.