The main window contains a:
- TODO list (text box), time allotted (list box), start time (text box).
- Count down timer (timer), start button (button).
I already have a class for the timer which contains few slots too.
Remaining widgets have their objects declared in the main() currently.
Now, I need to get the clicked item from the list and supply it to the timer.
The way to do it is to create signal-slots.
How to decide whether to make a separate class for widgets of a window or club them all together?
Any design patterns here?
A standard design pattern for GUI is MVP, presenter first or any variation. This means that the MVP classes should be as small as possible.
On the other hand, QT recommends to use model/view.
Try to form a logical entity – what you want your widget to do. If a timer is part of this entity, then put it there. Do not make god classes, because if you do, you have misused the MVP pattern.