⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

[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..


    Thanks :)

  • QImage::mirrored?

  • [quote author="peppe" date="1310313975"]QImage::mirrored?[/quote]

    @QString filename = ":/icons/Pictures/speaker.png";
    QImage image(filename);

    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);

    Edit: please use @ tags around code sections; Andre

  • Cool thanks, it works!

Log in to reply