The only reason something at all is changing is because you are unsing non initialized variables that give any garabage values they got at definition.
The fact you are not using the input parameter of updateItemRotation() doesn't help much either.
Then:
QTransform transform;
qreal m_rotation_x; //defining local variables. (the m_ notation suggests this should have a been a member - did you copy this?)
qreal m_rotation_y;
qreal m_rotation_z;
qreal old_rot_x = m_rotation_x; //You are setting the non initialized variables in on other local variables that will die when the function ends.
qreal old_rot_y = m_rotation_y;
qreal old_rot_z = m_rotation_z;
m_rotation_x = ui->xSpin->value();
m_rotation_y = ui->ySpin->value();
m_rotation_z = ui->zSpin->value();
QTransform transform;
qreal m_rotation_x; //defining local variables. (the m_ notation suggests this should have a been a member - did you copy this?)
qreal m_rotation_y;
qreal m_rotation_z;
QPointF center;
qreal old_rot_x = m_rotation_x; //You are setting the non initialized variables in on other local variables that will die when the function ends.
qreal old_rot_y = m_rotation_y;
qreal old_rot_z = m_rotation_z;
m_rotation_x = ui->xSpin->value();
m_rotation_y = ui->ySpin->value();
m_rotation_z = ui->zSpin->value();
To copy to clipboard, switch view to plain text mode
I am also not quite sure I understand what rotating on more than one axis means on a 2D widget?
Seems to me you are clueless about what you are doing, or trying to do.
Bookmarks