QPainter::rotate() might come in handy.