im connecting the start method of the thread in the QObject class ( CLASS Z in the previous post)
void QueryThread
::setupThread(QThread &qryThread
) {
qDebug () << "method invoked";
connect(&qryThread,SIGNAL(started()),this,SLOT(executeQuery()));
}
void QueryThread::setupThread(QThread &qryThread)
{
qDebug () << "method invoked";
connect(&qryThread,SIGNAL(started()),this,SLOT(executeQuery()));
}
To copy to clipboard, switch view to plain text mode
and im setting it up here in another class ( CLASS Y in the previous post)
QueryThread qryThread;
qryThread.setupThread(qThread);
qryThread.moveToThread(&qThread);
qThread.start();
QueryThread qryThread;
qryThread.setupThread(qThread);
qryThread.moveToThread(&qThread);
qThread.start();
To copy to clipboard, switch view to plain text mode
i dont get why this isnt working ? the method is never invoked
NOTE: QThread qThread; is a public attribute in CLASS Y
Bookmarks