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.
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 );
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 );
To copy to clipboard, switch view to plain text mode
Bookmarks