You could write public functions for the MainWindow
class that can be accessed from your DataControl class that would modify the ui elements.
Edit: Or you could write a funciton in the MainWindow
that would return a pointer to the ui variable and modify the the user interface from there.
like this:
MainWindow::getUI(){ return ui} // if your ui variable is already stored as a pointer
and now you can call the MainWindow::getUI()
function from the DataControler class and manipulate your Ui