The explicit connect would look something like this
Qt Code:
  1. MainWindow::MainWindow(QWidget* parent)
  2. : QMainWindow(parent)
  3. , ui(new Ui::MainWindow)
  4. {
  5. ui->setupUi(this);
  6.  
  7. connect(ui->tabWidget, &QTabWidget::currentChanged, this, &MainWindow::onCurrentTabChanged);
  8. }
To copy to clipboard, switch view to plain text mode 
where onCurrentTabChanged would be the function you currently have, just with a different name. Can be any valid method name in that class.

Cheers,
_