Hey Folks,
I am new to Qt and i got a problem on an application I am trying to code.
First of all, i am using Qt5 on Ubuntu.
That being said, I am trying to code a widget containing a QImage (png) and a label. I would like that at some moment, the image goes on top of the label. A hide() method isn't what I am looking for as my image is not plain and do not recover entirely my label, I still want it to be "part" visible.
My problem is that my label is always on top and never in background of my QImage, and I don't know how to manage it from my repaint event.
Here is what my code looks like:
path.addText(0, 0, painter.font(), "Foo");
painter.drawPath(path);
painter.drawImage(myPicture.rect(), myPicture, myPicture.rect());
QImage myPicture = QImage("./Foo.png");
QPainter painter(this);
QPainterPath path;
path.addText(0, 0, painter.font(), "Foo");
painter.drawPath(path);
painter.drawImage(myPicture.rect(), myPicture, myPicture.rect());
To copy to clipboard, switch view to plain text mode
Does anybody have an idea on this problem of mine ?
Thanks for having a look.
Bookmarks