My code is
class ExampleTest : public QObject
{
Q_OBJECT
public:
ExampleTest() {}
private Q_SLOTS:
void DoAllExampleTests();
};
void ExampleTest::DoAllExampleTests()
{
QProcess p;
p.start( "cmd /c wmic path Win32_usbcontrollerdevice|grep VID_1004" );
qDebug() << "Here 1";
QVERIFY( TRUE == p.waitForFinished() );
qDebug() << "Here 2";
}
QTEST_APPLESS_MAIN(ExampleTest);
I get a qwarn between Here 1 and Here 2
QObject::startTimer: Timers can only be used with threads started with QThread
I learnt from QObject::startTimer: Timers can only be used with threads started with QThread that when I subclass a Qt class and one of the members of the subclass is not part of the Qt hierarchy. I have the class ExampleTest inherited from QObject, but still I get the warning. How to avoid this warning?