After i create the ui.setup(this) in the main.cpp can i access the GUI widgets from any place in the app
-
The widgets are hidden from external code, so no, you cannot access them. In most cases it would be bad practice to do so anyway, it's best to design your class so that you have access functions to the things you need to change. I definitely wouldn't go storing pointers to the widgets anyplace outside the class.
-
You don't want the widgets to be publicly accessible. Really. You don't.
Just give your class that contains the widgets a proper public API to do whatever you need to show or read from that class, but do not expose the inner workings of your class to other parts of your application. It will lead to spagetti code, dependencies between unrelated parts of your application (making it very hard to track bugs, add features or change your GUI) and is generally Bad Style(TM).