Worked it out finally, it was really simple and you don't need to pass pointers at all like in your example. Instead you have to declare the functions within the mainwindow.h as private slots of MainWindow class.

mainwindow.h
Qt Code:
  1. private slots:
  2. void on_processButton_clicked();
  3. void RandomFunction();
To copy to clipboard, switch view to plain text mode 

mainwindow.cpp looks like
Qt Code:
  1. void MainWindow::on_processButton_clicked(){
  2. // do stuff
  3. MainWindow::randomFunction();
  4. }
To copy to clipboard, switch view to plain text mode 

secondary.cpp

Qt Code:
  1. #includes "mainwindow.h"
  2. #includes "ui_mainwindow.h"
  3.  
  4. void MainWindow::RandomFunction(){
  5. // do stuff
  6. ui->randomBox->setPlainText("text here");
  7. }
To copy to clipboard, switch view to plain text mode 

really simple with some example code there if anyone else is having the same issue when 1st coming over from console coding.