I would personally generate 25 QPushButtons (QLabel etc. - you may find which is appropriate) and position them in QGridLayout (it is easy to use and transparent).
For the purposes of signals, create a QSignalMapper and connect it with something like this
|
Source code
|
1
|
connect(button, SIGNAL(clicked()), signalMapper, SLOT(map()));
|
to each button. Then, with the function setMapping assign to each QPushButton an int (or QString) which stores the position. Then, you can connect the signal QSignalMapper::mapped(int) to any slot (method) which will handle the click "event".
As You're new to Qt, it could be a bit hard for You, I recommend You to study the Signals and Slots and Layout management pages as well as the pages of all classes mentioned above (in QtAssistant). It might be also good idea to start with Tutorial and some related Examples. If You get stuck, feel free to ask here.
This post has been edited 1 times, last edit by "stinny" (May 16th 2008, 11:01am)