瀏覽代碼

add a timer to quit the application

Fixes #385
Steve Pieper 11 年之前
父節點
當前提交
43e0975318
共有 1 個文件被更改,包括 5 次插入0 次删除
  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()));
     }
+  // the following is only in interactive mode
+  if (argc < 2 || QString(argv[1]) != "-I" )
+    {
+    QTimer::singleShot(400, &app, SLOT(quit()));
+    }
 
   return app.exec();
 }