Hi,

I am facing problem with QBasicTimer, here i am posting my demo code which will reproduce and explain my problem.

Qt Code:
  1. #include <QCoreApplication>
  2. #include <QBasicTimer>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. class MyClass:public QObject
  8. {
  9. public:
  10. MyClass(){};
  11. };
  12.  
  13. int main( int argc, char *argv[] )
  14. {
  15. QCoreApplication app( argc, argv );
  16. MyClass *mc = new MyClass();
  17. bt.start( 120 * 1000, mc );
  18.  
  19. while( bt.isActive() == true ) //It should get timeout after 2 minute, but here its not the case.
  20. {
  21. cout << "Basic Timer is Running : " << bt.timerId() << " ..!!!!!" << endl;
  22. }
  23.  
  24. return app.exec();
  25. }
To copy to clipboard, switch view to plain text mode 

Output...

Basic Timer is Running : 1 ..!!!!
Basic Timer is Running : 1 ..!!!!
Basic Timer is Running : 1 ..!!!!
Basic Timer is Running : 1 ..!!!!
Basic Timer is Running : 1 ..!!!!
Basic Timer is Running : 1 ..!!!!
Basic Timer is Running : 1 ..!!!!
Basic Timer is Running : 1 ..!!!!
.
.
.
.
.
//infinite time !!


When the timer will get timeout ? or I have to stop it explicitly to get Timer state isActive() = false ???