I have a QMainWindow class.
class MainWindow: public QMainWindow
{
Q_OBJECT
...
public:
void insertVector();
...
};
and I have class SqlStorage to make operation with Data Base.
class SqlStorage : public QObject {
Q_OBJECT
...
public:
static void loadSQL();
...
};
In insertVector() method I try to asynchronously write in DB.
void MainWindow::insertVector()
{
SqlStorage* _sqlStorage = new SqlStorage;
QFuture<void> future = QtConcurrent::run(_sqlStorage, &SqlStorage::loadSQL);
}
But when I try to compile, I have error that: "term does not evaluate to a function taking 1 arguments".
Where is my problem?