Havard
15th October 2006, 17:21
Hi.
I am just starting out learning QT, and really loving it! I have a few very basic questions about using QImage to create a simple chess GUI.
Say I have a picture of a chess board, and of all the pieces. I now need to somehow define the board as a kind of "background" so that when I move the images of the pieces around on the board, it does not destroy the board-picture. What is the "best" way of doing this in QT? (thinking of semi-fast way of showing, moving and taking away the images of the pieces on top of the board).
I have looked at QImage and Qpixmap, and have learned that QImage is best suited to load the images of the pieces (and transform them to fit the board's squares), and that Qpixmap probably is my choice for displaying them, but I am a bit stuck on what way is best to add, take away and move them on top of the board?
Thank you!
Havard
I am just starting out learning QT, and really loving it! I have a few very basic questions about using QImage to create a simple chess GUI.
Say I have a picture of a chess board, and of all the pieces. I now need to somehow define the board as a kind of "background" so that when I move the images of the pieces around on the board, it does not destroy the board-picture. What is the "best" way of doing this in QT? (thinking of semi-fast way of showing, moving and taking away the images of the pieces on top of the board).
I have looked at QImage and Qpixmap, and have learned that QImage is best suited to load the images of the pieces (and transform them to fit the board's squares), and that Qpixmap probably is my choice for displaying them, but I am a bit stuck on what way is best to add, take away and move them on top of the board?
Thank you!
Havard