I have a main class.
This creates another class, achild.
achild creates another class, bchild.
bchild can get it's parent (achild) by self.parent(), but how can it get it's grandparent (main class)?
(ok, maybe I could use self.parent().parent(), but what about bchild 's children? how would they access to main class?)
Would it be a good practice if all children imported main class?
It doesn't seem very good to me.
This creates another class, achild.
achild creates another class, bchild.
bchild can get it's parent (achild) by self.parent(), but how can it get it's grandparent (main class)?
(ok, maybe I could use self.parent().parent(), but what about bchild 's children? how would they access to main class?)
Would it be a good practice if all children imported main class?
It doesn't seem very good to me.