@@ -58,6 +58,9 @@ void GlobalShortcut::setActive(bool active)
59void GlobalShortcut::componentComplete()
59void GlobalShortcut::componentComplete()
61+ if (this->window()) {
62+ QMetaObject::invokeMethod(this, "setupFilterOnWindow", Q_ARG(QQuickWindow*, this->window()));
61 connect(this, &QQuickItem::windowChanged, this, &GlobalShortcut::setupFilterOnWindow);
64 connect(this, &QQuickItem::windowChanged, this, &GlobalShortcut::setupFilterOnWindow);