I have the following class:
class commMonitor : QObject
{
Q_OBJECT
public:
commMonitor();
~commMonitor();
private:
QMap<unsigned short int, QTimer*> Monitors;
QTimer* currTimer;
public slots:
void createMonitor(unsigned short int);
void deleteMonitor(unsigned short int);
void startMonitor(unsigned short int);
void stopMonitor(unsigned short int);
};
when I tried to do the following:
commMonitor* commOverWatch = new commMonitor();
QThread* monitorThread = new QThread();
commOverWatch->moveToThread(monitorThread);
the visual studio won't compile, and the error is the QObject::moveToThread is inaccessible.
What's going wrong here?