Then you can't access parents widgets, if you have no knowledge of them. You should somehow pass a pointer to the parent or move that functionality to the parent (which obviously has the knowledge of itself) for example using signals and slots.