Unsolved Scrabble
-
Hi,
I want to create a Scrabble game and I don't really know, how best to construct the board.
I'm thinking about using QGridLayout, but what type of widget should I put in it as squares? I need sth I can define the size and background and then implement a letter or overwrite it with another tile-like widget.Do you have some tips or suggestions for me?
-
Hi and welcome to devnet,
Sounds like rather a job for QtQuick or the Graphics View framework
-
Thanks for an answer!
Soo, considering Graphics View, how best to do it? How to create board, so that the tiles could only be dropped on the squares and I could write some conditions about them being correctly set? And how should I define tiles? I suppose, they could be QGraphicsRectItem objects. First I need to create the fixed set of them. Can I do this with an array, store them in a "bag" and then take random ones out into a players "rack" every round?
-
I found, how to specify positions: http://www.walletfox.com/course/qgraphicsrectitemdragdrop.php.
What about other issues? -
Take a look at the Graphics View examples. Several of your questions are already answered there.