I have a question.
There are two classes: A and B. A creates object of type B. So from A, it is easy to access methods of B, but how can I access methods of object A from object B? I am trying to use bidirectional signal-slot mechanism in Qt. A can easily have a slot for a signal in B, but B cannot see signals in A.
I have a vague idea that somehow the creator class can be referenced as a 'member' while an object is being created, but I am not sure how to do code this.
Thanks in advance.
There's no way to do this automatically. You'll just have to give each B a reference to A when you create it, something like b_instance.parent = a_instance.
How to reference creator object in Python?