diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-03-30 16:36:46 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-04-06 12:06:34 +0000 |
commit | 0a1ff7aacaf7da52c4345f4c354729d53c2f31c7 (patch) | |
tree | 77bce870823e0db661b7ff95ea1c4910e6f3a828 /tests/manual/nodetypes/nodetypes.cpp | |
parent | 7388c6d5f8bf4c9c7f09a36d399e0131c7052c6b (diff) |
D3D12: Fix Animators with non-GL backends
Add a test for render thread Animators.
Change-Id: Iddb11f734ccec00d76ca99cd8349cbb65750e784
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'tests/manual/nodetypes/nodetypes.cpp')
-rw-r--r-- | tests/manual/nodetypes/nodetypes.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/manual/nodetypes/nodetypes.cpp b/tests/manual/nodetypes/nodetypes.cpp index 80753de766..c5b46a3317 100644 --- a/tests/manual/nodetypes/nodetypes.cpp +++ b/tests/manual/nodetypes/nodetypes.cpp @@ -39,7 +39,20 @@ ****************************************************************************/ #include <QGuiApplication> +#include <QThread> #include <QQuickView> +#include <QQmlEngine> +#include <QQmlContext> + +class Helper : public QObject +{ + Q_OBJECT + +public: + Q_INVOKABLE void sleep(int ms) { + QThread::msleep(ms); + } +}; int main(int argc, char **argv) { @@ -52,9 +65,12 @@ int main(int argc, char **argv) qDebug(" [4] - A lot of rectangles (perf)"); qDebug(" [I] - Images"); qDebug(" [T] - Text"); + qDebug(" [A] - Render thread Animator"); qDebug("\nPress S to stop the currently running test\n"); + Helper helper; QQuickView view; + view.engine()->rootContext()->setContextProperty(QLatin1String("helper"), &helper); view.setResizeMode(QQuickView::SizeRootObjectToView); view.resize(1024, 768); view.setSource(QUrl("qrc:/main.qml")); @@ -62,3 +78,5 @@ int main(int argc, char **argv) return app.exec(); } + +#include "nodetypes.moc" |