diff options
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 1dd855b59f..9a6a84309e 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -7844,7 +7844,8 @@ public: private slots: void slotTimer() { - const QImage im = grab(QRect(QPoint(0, 0), size())).toImage(); + QScreen *screen = windowHandle()->screen(); + const QImage im = screen->grabWindow(internalWinId(), 0, 0, -1, -1).toImage(); color = im.pixel(1, 1); accept(); } |