I have a work around now. I can get the behavior I'm looking for if I do the following:

* Translate the item to the rotation center point
* Rotate the item
* Translate the item back to the starting position

See the code below for details. I still don't understand why setTransformOriginPoint() doesn't work. Can any Qt experts out there shed some light on this.

Brian

Qt Code:
  1. void MainWindow::updateRotate(qreal value)
  2. {
  3. QTransform txf = QTransform();
  4.  
  5. rotateAngle = 360*value;
  6.  
  7. switch (rotateAxis)
  8. {
  9. case 0:
  10. // Up arrow - Rotate along top axis
  11. txf.translate(item->boundingRect().width()/2, 0);
  12. txf.rotate(rotateAngle, Qt::XAxis);
  13. txf.translate(-item->boundingRect().width()/2, 0);
  14. //item->setTransformOriginPoint(item->boundingRect().width()/2, item->boundingRect().height()/2);
  15. break;
  16.  
  17. case 1:
  18. // Right arrow - Rotate along rigth axis
  19. txf.translate(item->boundingRect().width(), item->boundingRect().height()/2);
  20. txf.rotate(rotateAngle, Qt::YAxis);
  21. txf.translate(-item->boundingRect().width(), -item->boundingRect().height()/2);
  22. //item->setTransformOriginPoint(item->boundingRect().width(), item->boundingRect().height()/2);
  23. break;
  24.  
  25. case 2:
  26. // Left arrow - Rotate along left axis
  27. txf.translate(0, item->boundingRect().height()/2);
  28. txf.rotate(rotateAngle, Qt::YAxis);
  29. txf.translate(0, -item->boundingRect().height()/2);
  30. //item->setTransformOriginPoint(0, item->boundingRect().height()/2);
  31. break;
  32.  
  33. case 3:
  34. // Down arrow - Rotate along bottom axis
  35. txf.translate(item->boundingRect().width()/2,item->boundingRect().height());
  36. txf.rotate(rotateAngle, Qt::XAxis);
  37. txf.translate(-item->boundingRect().width()/2,-item->boundingRect().height());
  38. //item->setTransformOriginPoint(item->boundingRect().width()/2,item->boundingRect().height());
  39. break;
  40. }
  41.  
  42. item->setTransform(txf, false);
  43. }
To copy to clipboard, switch view to plain text mode