The explicit connect would look something like this
MainWindow
::MainWindow(QWidget* parent
) , ui(new Ui::MainWindow)
{
ui->setupUi(this);
connect(ui->tabWidget, &QTabWidget::currentChanged, this, &MainWindow::onCurrentTabChanged);
}
MainWindow::MainWindow(QWidget* parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
connect(ui->tabWidget, &QTabWidget::currentChanged, this, &MainWindow::onCurrentTabChanged);
}
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,
_
Bookmarks