aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/declarative/qsgitem/tst_qsgitem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/declarative/qsgitem/tst_qsgitem.cpp b/tests/auto/declarative/qsgitem/tst_qsgitem.cpp
index 05e59a69f0..99c1cf6b5b 100644
--- a/tests/auto/declarative/qsgitem/tst_qsgitem.cpp
+++ b/tests/auto/declarative/qsgitem/tst_qsgitem.cpp
@@ -43,6 +43,7 @@
#include "qsgitem.h"
#include "qsgcanvas.h"
+#include <QtWidgets/QGraphicsSceneMouseEvent>
#include "private/qsgfocusscope_p.h"
#include "../../../shared/util.h"
#include <QDebug>
@@ -132,9 +133,10 @@ private slots:
void hoverEventInParent();
private:
- void ensureFocus(QWidget *w) {
+
+ void ensureFocus(QWindow *w) {
w->show();
- qApp->setActiveWindow(w);
+ w->requestActivateWindow();
qApp->processEvents();
#ifdef Q_WS_X11