make sure children are included in the moveToThread
authorDaniel Stonier <d.stonier@gmail.com>
Sun, 7 Sep 2014 19:31:37 +0000 (04:31 +0900)
committerDaniel Stonier <d.stonier@gmail.com>
Sun, 7 Sep 2014 19:31:37 +0000 (04:31 +0900)
modules/highgui/src/window_QT.cpp

index 5093934..bdf696e 100644 (file)
@@ -740,14 +740,14 @@ double cvGetOpenGlProp_QT(const char* name)
 GuiReceiver::GuiReceiver() : bTimeOut(false), nb_windows(0)
 {
     doesExternalQAppExist = (QApplication::instance() != 0);
-    if ( doesExternalQAppExist ) {
-        moveToThread(QApplication::instance()->thread());
-    }
     icvInitSystem(&parameterSystemC, parameterSystemV);
 
     timer = new QTimer(this);
     QObject::connect(timer, SIGNAL(timeout()), this, SLOT(timeOut()));
     timer->setSingleShot(true);
+    if ( doesExternalQAppExist ) {
+        moveToThread(QApplication::instance()->thread());
+    }
 }