Ok, I've got it fitting inside the box no matter how it rotates, but I can't get it to paint INSIDE the box. What I mean by this is, perhaps the bottom left of the box is at (20,20) and I want to paint the polygon inside the box like so:

QPolygon polygon;
polygon << QPoint(0,0) << QPoint(20, 0) << QPoint(10, 20);
painter.drawPolygon(polygon);

so that no matter where I move the QRect, say the bottom left is not at (30,5) my polygon will still be painted correctly inside the QRect, not at the bottom left corner of the entire screen.
Thank you again for any help.