PDA

View Full Version : Chess Program Drag and drop pieces



cwnelatury
29th April 2009, 19:30
Hey all


I have the project uploaded at

http://uploading.com/files/HU7GV7PQ/Chess.zip.html

-you have to wait around 90 seconds to start downloading

Anyway..when you open the project and run it and click play...you will see a board with two pawns...I want to be able to move these pawns(picture labels) on the board(background label).

Could you PLEASE help me with this..
Thanks

fullmetalcoder
29th April 2009, 20:42
I suggest you take a look at a very interesting read (http://www.catb.org/%7Eesr/faqs/smart-questions.html).

Once you're done you should consider reading the docs (http://doc.trolltech.com/), especially the tutorials (http://doc.trolltech.com/4.4/tutorials.html) and examples (http://doc.trolltech.com/4.4/examples.html).

Then you may consider trying out the forum search (http://www.qtcentre.org/forum/search.php) function.

If you do that you might be able to :


figure out that none is going to do your work for you
rephrase your question/problem in a way that allows us to answer it and prevents advanced users from dismissing your thread
find the answer on your own (turns out drag and drop is well documented and there is at least one board game available in the Qt software section making use of it in the way you're interested in)

Please don't take this personnaly though. It is part of an attempt to educate new users. Only time will tell if this a reasonnable goal.

wysota
29th April 2009, 22:43
Hey all


I have the project uploaded at

http://uploading.com/files/HU7GV7PQ/Chess.zip.html

-you have to wait around 90 seconds to start downloading


Please don't do that again. Next time use the attachment feature of the forum - files placed on external sites tend to vanish after some time rendering the whole forum thread useless for others with similar problems.


I want to be able to move these pawns(picture labels) on the board(background label).

I don't really want to wait 90 seconds, build your application and figure out what it does, so I'll just tell you that using labels for a chess board and pawns is probably a much worse idea than using GraphicsView or model/view. So once you do what fullmetalcoder told you, consider familiarizing yourself with QGraphicsView.