Hi,
In my applications I have class which contains QMap, and several child classes which execute tasks on the variables from this map.
Now I would ask you, which way for communication between parent - child is a better in this case:
- cast the parent pointer to the right type and then call parent function
- store the pointer to the parent somewhere in the child when receiving it in the constructor
or use signals and slots - send signal to parent with key as argument and then wait for value from map?
But with signals and slots is a problem, because when child send signal with key to parent class then parent should send signal with value to only specific child object but signal is send to all child.
Which way you choose when you have a similar problem?
Thanks,
Bookmarks