Browse Source

add a timer to quit the application

Fixes #385
Steve Pieper 11 years ago
parent
commit
43e0975318
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Libs/Widgets/Testing/Cpp/ctkColorDialogTest1.cpp

+ 5 - 0
Libs/Widgets/Testing/Cpp/ctkColorDialogTest1.cpp

@@ -91,6 +91,11 @@ int ctkColorDialogTest1(int argc, char * argv [] )
     {
     {
     QTimer::singleShot(200, &colorDialog, SLOT(accept()));
     QTimer::singleShot(200, &colorDialog, SLOT(accept()));
     }
     }
+  // the following is only in interactive mode
+  if (argc < 2 || QString(argv[1]) != "-I" )
+    {
+    QTimer::singleShot(400, &app, SLOT(quit()));
+    }
 
 
   return app.exec();
   return app.exec();
 }
 }