yes the same thing i am trying for QTransform to rotate the view but no vain ..
in Qt demo chip application
they use QMatrix only to rotate the QGraphicsView()
see in chip/view.cpp
void View::setupMatrix()
{
qreal scale = qPow(qreal(2), (zoomSlider->value() - 250) / qreal(50));
matrix.scale(scale, scale);
matrix.rotate(rotateSlider->value());
graphicsView->setMatrix(matrix);
setResetButtonEnabled();
}
void View::setupMatrix()
{
qreal scale = qPow(qreal(2), (zoomSlider->value() - 250) / qreal(50));
QMatrix matrix;
matrix.scale(scale, scale);
matrix.rotate(rotateSlider->value());
graphicsView->setMatrix(matrix);
setResetButtonEnabled();
}
To copy to clipboard, switch view to plain text mode
i dont know why they dont use QTransform
Bookmarks