[Solved] How to reflect an image at a label?
-
I have 2 labels with images.. The images is the same thing but the other is a reflection of it.. ( So it is the original image and the other one edited with gimp, so 2 images )..
Is there any way i can reflect the original right away at the label ( so i can delete the reflected-edited image ).. Check out this screenshot to understand what i mean..!http://img838.imageshack.us/img838/217/screenshotpreferencesk.png(Screenshot)!
Thanks :)
-
[quote author="peppe" date="1310313975"]QImage::mirrored?[/quote]
@QString filename = ":/icons/Pictures/speaker.png";
QImage image(filename);
image.mirrored();
ui->label_3->setPixmap(QPixmap::fromImage(image));@I know the image.mirrored part is wrong.. Can you tell what should i have in place of that line?
-
It should be
@
QString filename = ":/icons/Pictures/speaker.png";
QImage image(filename);
//Original image is not changed,so create a copy to store mirror image
QImage mirrorImage = image.mirrored(true,false);
ui->label_3->setPixmap(QPixmap::fromImage(mirrorImage));
@Edit: please use @ tags around code sections; Andre