Hi all,
I am new to Qt, currently I am using Qt 4 on Linux. I am writing a application similar to the "draggableicons" sample. All I need is icons should rotate say 40 degrees when we right click on it. Can some body explain how to do it? Here is the code I have modified
in the draggableicons sample, but it doesnt work 
{
.
.
.
painter.begin(&tempPixmap);
//rotate abt 60 degrees
painter.rotate(60);
painter.
fillRect(pixmap.
rect(),
QColor(127,
127,
127,
127));
painter.end();
.
.
.
}
void DragWidget::mousePressEvent(QMouseEvent *event)
{
.
.
.
QPixmap tempPixmap = pixmap;
QPainter painter;
painter.begin(&tempPixmap);
//rotate abt 60 degrees
painter.rotate(60);
painter.fillRect(pixmap.rect(), QColor(127, 127, 127, 127));
painter.end();
.
.
.
}
To copy to clipboard, switch view to plain text mode
Thanks in advance,
Prasanna Bhat
Bookmarks