painter.rotate(n); painter.translate( rt.center().x(), rt.center.y() );painter.drawRect(rt);
QRect rt(200,100,140,200);QPoint c = QPoint( rt.center().x(), rt.center().y() );double angle = 15.0;QWMatrix wm1;wm1.translate( -c.x(), -c.y() );QWMatrix wm2;wm2.rotate( angle );QWMatrix wm3;wm3.translate( c.x(), c.y() );painter.setWorldMatrix( wm1 * wm2 * wm3 );painter.drawRect( rt );