PDA

View Full Version : Display images and move them



AL
11th February 2010, 11:02
Hello,
I am developing a checkers game for Mac and Win.
I am displaying each piece in a QLabel in the following way

QLabel *piece = new QLabel("piece",this);
piece->setPixmap(QPixmap("piece.png"));
Now I have to display kings and I would like to overlap two images (piece.png) in the same QLabel because I have to move the two pieces (king) together in my animations. How can I do that?

Tx a lot!!

AL
11th February 2010, 11:13
sorry this was not the right section. I created the new post in the right area "QT Programming"

high_flyer
11th February 2010, 11:15
I don't think you can avoid creating a custom widget, which takes multiple pixmaps.
Either that, or merge the two images in to one image with a graphics editing application and use that as your pixmap.