Hello!

I'm very new to C++ (learning while writing this app). I do have some experience with QT using pyside2, but i want to write my app in C++.

My current problem is calling one function with connect() AND QTimer::singleShot().

some snippets of my code:

mainwindow.h
Qt Code:
  1. private slots: // in MainWindow class
  2. void searchTable(int searchID);
To copy to clipboard, switch view to plain text mode 

mainwindow.cpp
Qt Code:
  1. #include "mainwindow.h"
  2. #include "systemdialog.h"
  3. #include "ui_MainWindow.h"
  4. #include "ui_SystemDialog.h"
  5. MainWindow::MainWindow(QWidget *parent):
  6. QMainWindow(parent),
  7. ui(new Ui::MainWindow)
  8. {
  9. ui->setupUi(this);
  10. // SEARCH TABLE UPDATE
  11. connect(ui->comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(searchTable(int)));
  12. // LOAD TABLES
  13. QTimer::singleShot(8500, this, SLOT(searchTable(50)));
  14. etc..
  15. }
To copy to clipboard, switch view to plain text mode 

search.cpp
Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_MainWindow.h"
  3.  
  4. void MainWindow::searchTable(int searchID){
  5. //my code
  6. }
To copy to clipboard, switch view to plain text mode 

App works ok and connect() works ok. And if i call function searchTable(50); after connect() also works ok. Only when i want to use connect() and QTimer::singleShot() i get this issue in Qt Creator App Output:
Qt Code:
  1. QObject::connect: No such slot MainWindow::searchTable(50) in ../NewApp/mainwindow.cpp:70
  2. QObject::connect: (receiver name: 'MainWindow')
To copy to clipboard, switch view to plain text mode 
So what am i doing wrong?