Hi,

How can I access the main window widget from a child widget N levels down?

e.g. in main.cpp I have
Qt Code:
  1. MainAppUI w;
  2. w.show();
To copy to clipboard, switch view to plain text mode 
Then within w I create widgets so eventually I have
w->aa->bb->cc->...>xx->yy->zz->bottomwidget
where I never know exactly how many parents there will be.

How then, in bottomwidget, can I access w? In bottomwidget I declare w as a friend class, but buttomwidget needs to access functions and variables in w. How, without writing a function to explicitly pass the pointer to bottomwidget, can I do this?

Thanks!
Jay