From dc7f31dbd698e00cd25d36b4568b03dd83032ecc Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 6 Sep 2010 16:46:28 +1000 Subject: Fix recording of QML visual tests when using a QGLWidget viewport. In order for the event filter to work, we need to set the QGLWidget as the viewport before constructing the QDeclarativeTester. --- tools/qml/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 7421b5e..78cd64d 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -441,6 +441,7 @@ static QDeclarativeViewer *createViewer() QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags); viewer->setAttribute(Qt::WA_DeleteOnClose, true); + viewer->setUseGL(opts.useGL); if (!opts.scriptopts.isEmpty()) { viewer->setScriptOptions(opts.scriptOptions); @@ -492,8 +493,6 @@ void showViewer(QDeclarativeViewer *viewer) viewer->showMaximized(); else viewer->show(); - - viewer->setUseGL(opts.useGL); viewer->raise(); } -- cgit v0.12