i am working on qt for a p2p gui, while i am trying to add connect to a lambda function, the compiler throw error complaining: 'void QThread::started()' is protected, however i can find no clues to fix this, please help me out, thx a lot. The context code is:
this->ip[3][20] = {"11.23.12.1","11.23.12.2","11.23.12.3"};
int i = 0;
this->p2p[i] = new p2p();
this->p2p_thread[i] = new QThread();
this->p2p[i]->moveToThread(this->p2p_thread[i]);
QObject::connect(this->p2p_thread[i], &QThread::started,
this->p2p[i], [=] {this->p2p[i]->p2p_decode(&this->ip[i][0]);});
this->p2p_thread[i]->start();