I have two images, one inside another. first I used two QFrame s and set background image via stylesheets.
but this was not a good idea as QFrame has no pixmap() member.
I changed QFrame to QLabel n set the background image of the inner image via stylesheets. (only the inner image shall rotate).

Now, I used the following code to try rotating QLabel background image, though I get segmentation fault, when assignig QLabel pixmap to the Qpixmap variable.

Qt Code:
  1. QPixmap pixmap(*ui->label_11->pixmap());
  2. QMatrix rm;
  3. rm.rotate(90);
  4. pixmap = pixmap.transformed(rm);
  5. ui->label_11->setPixmap(pixmap);
To copy to clipboard, switch view to plain text mode