Because the second time the label's pixmap is null since you set a QPicture instead.
You shouldn't use setPicture, but setPixmap and instead of a QPicture use a QPixmap.
So:
if(pix)
{
QPixmap rotated
(pix
->size
().
width(), pix
->size
().
height());
paint.rotate(27);
paint.drawPixmap(0,0,*pix);
paint.end();
pxldest->setPixmap(rotated);
QMessageBox::information(this,
"Rotated",
"Image rotated");
}
QPainter paint;
QPixmap *pix=pxldest->pixmap();
if(pix)
{
QPixmap rotated(pix->size().width(), pix->size().height());
paint.rotate(27);
paint.drawPixmap(0,0,*pix);
paint.end();
pxldest->setPixmap(rotated);
QMessageBox::information(this,"Rotated","Image rotated");
}
To copy to clipboard, switch view to plain text mode
Regards
Bookmarks