I'm trying to shear a QGraphicsItem with a custom transformOriginPoint, but there is no QGraphicsItem::setShear (like there is for rotation: QGraphicsItem::setRotation).

I realize I could create my own transform matrix and use QGraphicsItem::setTransform, but it doesn't seem to take into account the transformOriginPoint, which in my case is not (0,0).

For example, the following two examples produce completely different behavior:

Qt Code:
  1. // takes into account the transformOriginPoint
  2. myItem->setRotation(30);
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. // does not take into account the transformOriginPoint
  2. QTransform hi;
  3. hi.rotate(30);
  4. myItem->setTransform(hi);
To copy to clipboard, switch view to plain text mode