Ok this is quite a noob question, I know. I have made this
constructor of mainwindow.cpp:
Qt Code:
  1. (void) new QShortcut(Qt::ALT + Qt::Key_1, this, SLOT(show_m(0)));
  2. (void) new QShortcut(Qt::ALT + Qt::Key_2, this, SLOT(show_m(1)));
  3. (void) new QShortcut(Qt::ALT + Qt::Key_3, this, SLOT(show_m(2)));
  4. (void) new QShortcut(Qt::ALT + Qt::Key_4, this, SLOT(show_m(3)));
To copy to clipboard, switch view to plain text mode 
well, the slot show_m(int) looks like:
Qt Code:
  1. int MainWindow::show_m(int a)
  2. {
  3. ui->tabWidget->setCurrentIndex(a);
  4. }
To copy to clipboard, switch view to plain text mode 
As you may understand, I want by pressing Alt+1/2/3/4 to navigate through the tabs. I don't get compile error but output error:
Qt Code:
  1. Object::connect: No such slot MainWindow::show_m(0) in megauploadMain.cpp:102
  2. Object::connect: (receiver name: 'MainWindow')
  3. Object::connect: No such slot MainWindow::show_m(1) in megauploadMain.cpp:103
  4. Object::connect: (receiver name: 'MainWindow')
  5. Object::connect: No such slot MainWindow::show_m(2) in megauploadMain.cpp:104
  6. Object::connect: (receiver name: 'MainWindow')
  7. Object::connect: No such slot MainWindow::show_m(3) in megauploadMain.cpp:105
  8. Object::connect: (receiver name: 'MainWindow')
To copy to clipboard, switch view to plain text mode 
Thx in advance for any replies!