i know the method QSignalMapper but don't konw how to use it with this code
Qt Code:
  1. connect( ui->welcome, SIGNAL(changeStackedWidgetIndex(int)),
  2. ui->stackedWidget, SLOT(setCurrentIndex(int)) );
  3. connect( ui->credentials, SIGNAL(changeStackedWidgetIndex(int)),
  4. ui->stackedWidget, SLOT(setCurrentIndex(int)) );
  5. connect( ui->config, SIGNAL(changeStackedWidgetIndex(int)),
  6. ui->stackedWidget, SLOT(setCurrentIndex(int)) );
  7. connect( ui->syncwindow, SIGNAL(changeStackedWidgetIndex(int)),
  8. ui->stackedWidget, SLOT(setCurrentIndex(int)) );
  9. connect( ui->loaduser, SIGNAL(changeStackedWidgetIndex(int)),
  10. ui->stackedWidget, SLOT(setCurrentIndex(int)) );
To copy to clipboard, switch view to plain text mode