From 0ed8eb5a40ac640535ca66f243c36a41b0f48a3d Mon Sep 17 00:00:00 2001 From: Daniel Pizetta Date: Wed, 7 Feb 2018 17:01:42 -0200 Subject: [PATCH] Add --test as command line option for test purposes --- example/example.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/example.py b/example/example.py index 06dd77b41..bce8e0c70 100644 --- a/example/example.py +++ b/example/example.py @@ -58,7 +58,8 @@ def main(): help="Choose which wrapper/framework is to be used to run the example.", type=str) parser.add_argument('--no_dark', action='store_true', help="Exihibts the original window (without qdarkstyle).") - + parser.add_argument('--test', action='store_true', + help="Auto close window after 2s.") # parsing arguments from command line args = parser.parse_args() @@ -177,7 +178,7 @@ def main(): # connect some actions, signals and functions # auto quit after 2s when testing on travis-ci - if "--travis" in sys.argv: + if "--test" in sys.argv: QTimer.singleShot(2000, app.exit) # run