Hi All
I'm trying to rotate my scene with several Items. I'm looking at the scene and I want rotate the scene around some point( point equal to centerTo idealy ).
void MyGraphicsView::updateTransform()
{
QTransform tr;
tr.rotate(m_yRotate/1.0, Qt::YAxis);
tr.rotate(m_xRotate/1.0, Qt::XAxis);
tr.translate(some_point.x(), some_point.y());
setTransform(tr);
/**/
}
void MyGraphicsView::updateTransform()
{
QTransform tr;
tr.rotate(m_yRotate/1.0, Qt::YAxis);
tr.rotate(m_xRotate/1.0, Qt::XAxis);
tr.translate(some_point.x(), some_point.y());
setTransform(tr);
/**/
}
To copy to clipboard, switch view to plain text mode
In other words how can I change the position of YAxis or/and XAxis during such transform?
So far rotation is done around some Axis I can not controll.
I've tryed to play with:
translate
setTransformationAnchor(QGraphicsView::NoAnchor);
setResizeAnchor(QGraphicsView::NoAnchor);
setAlignment();
Any ideas ?
Thank you!
Bookmarks