Parvat
5th June 2013, 12:44
I want to rotate a particular image that is drawn in QRectf this my code ,I DO GET THE IMAGE but when i try to rotate it gets rotate outside the rectangle.
help me out guys.
QPainter painter(this);
painter.setPen(Qt::yellow);
painter.setPen(Qt::DashDotDotLine);
QRectF rectangle( 10.0, 50.0, 400, 400 );
painter.drawRect( rectangle );
QRectF Rect( 10.0, 50.0, 400.0, 400 );
painter.rotate(90);
painter.drawImage( Rect, myImage );
help me out guys.
QPainter painter(this);
painter.setPen(Qt::yellow);
painter.setPen(Qt::DashDotDotLine);
QRectF rectangle( 10.0, 50.0, 400, 400 );
painter.drawRect( rectangle );
QRectF Rect( 10.0, 50.0, 400.0, 400 );
painter.rotate(90);
painter.drawImage( Rect, myImage );