Positioning QGraphicsItem in the middle of viewport - jittering
Unsolved
Qt 6
-
I have a huge QgraphicsScene and a QGraphicsItem which changes its position according to pressed key arrows. I want the item to always be in the centre of the viewport. I used QGraphicsView::centerOn() and its exactly what i need, but there is jittering problem - and as i read its associated with the integer precision issue. So whats the way around? Another post says to use QGraphicsView::translate() and setTransformationAnchor(QGraphicsView::NoAnchor). But it doesnt seem to work.