What do you consider best practice for developing signal / slot interactions to update element values ββin a class?
For example, consider a member variable that is presented in the user interface. The user changes the value in the user interface. There is a signal / slot relationship for automatically updating a member variable through the member variable updating function.
We also want the changes in the member variable to automatically update in the user interface, so the signal / slot ratio happens differently. When updating a member variable through the update function, the signal triggers the user interface that needs to be updated.
How do you prevent their spread? Is it as simple as checking a new value for the current value when calling the update function of a member variable and only sending a signal to update the user interface, if there is a difference?
Or ... is there a more elegant way to do this?
source share