You cannot directly access ui MainWindow on your tabs. Since your QTabWidget is a child of MainWindow (this is how it should be implemented and assumes you did it).
But you can achieve this with signals and slots. You can perform operations in your MainWindow by writing slots to signals coming from individual tabs.
OR
You can write a method on MainWindow that will work on it. And name it from the tab widget -
this->parent->parent->uiMethod();
source share