diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc index 69d0324898..ec2e859d24 100644 --- a/ext/qt/qtitem.cc +++ b/ext/qt/qtitem.cc @@ -412,7 +412,11 @@ void QtGLVideoItem::handleWindowChanged(QQuickWindow *win) { if (win) { - connect(win, SIGNAL(sceneGraphInitialized()), this, SLOT(onSceneGraphInitialized()), Qt::DirectConnection); + if (win->isSceneGraphInitialized()) + onSceneGraphInitialized(); + else + connect(win, SIGNAL(sceneGraphInitialized()), this, SLOT(onSceneGraphInitialized()), Qt::DirectConnection); + connect(win, SIGNAL(sceneGraphInvalidated()), this, SLOT(onSceneGraphInvalidated()), Qt::DirectConnection); } else { this->priv->qt_context = NULL;