PDA

View Full Version : Advice and Widgets To Use



different
24th March 2010, 04:25
Hello Everyone,

I came across this website via a Google search, and it seems like a great resource to learn! I am brand new to QT and need to implement a graphical Mancala game. If you are unfamiliar with this game, you can see this flash version: http://www.novelgames.com/flashgames/game.php?id=204

I noticed that QT has several widgets. My idea is to use the "Push Button" widget to use to represent each player rows. Each button instance will print somehow the amount of balls that are currently in the location. Is that a suitable widget to use, or something else preferred?

Since (my idea) there are 12 buttons (6 for player 1 and 6 for player 2) is there a way to tie all these buttons together such as a link list or even an array? I thought I would ask because even though the QT documentation seems very good I am bit overwhelmed with the amount of content to read.

Anyways, those are my initial ideas, and I would appreciate any advice given.

Thanks for your time.

prof.ebral
24th March 2010, 05:19
I think you are going about the idea way to simplistic. If I where designing the game I would use GraphicsScene and GraphicsView. Each stone could be a GraphicsItem.

I think you would be allowed a lot more in the realm of effects with that setup then if you tried to make a simplistic game that used a button. You could just setup a tool tip for the little pocket that holds the stones. It's much more fluid than using a button.

aamer4yu
24th March 2010, 05:55
I back for the graphics view use.
You can have a look at the asteroid demo in Qt Demos under graphics View...

different
25th March 2010, 00:52
Thanks a lot. I will take a look at this and see what I can do.