diff options
author | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2015-08-21 12:48:36 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-11-30 13:47:02 +0000 |
commit | 4b09f9ffdc7b5fd3c4e18d9fff3350390baac130 (patch) | |
tree | a3702de31fad58bba38d22d8e35a585fea622a02 /tests/manual/gifs/gifrecorder.h | |
parent | 3b9dc5c6e728872af4328e156a68b51931c1055f (diff) |
GifRecorder: don't assume QQuickView
This allows us to use windows as root items, which means we can have
complete examples - not just a snippet without imports. With this, we
can have runnable snippets under each GIF, without the need for the
user to add code to get it to run.
This change is also necessary to generate GIFs for Panel-based items
like Menu, which require an ApplicationWindow.
Change-Id: I66fec30cde8d719be35766f8c917cd2a06b09127
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/manual/gifs/gifrecorder.h')
-rw-r--r-- | tests/manual/gifs/gifrecorder.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/manual/gifs/gifrecorder.h b/tests/manual/gifs/gifrecorder.h index f848a1f4..3f8aa1b6 100644 --- a/tests/manual/gifs/gifrecorder.h +++ b/tests/manual/gifs/gifrecorder.h @@ -39,7 +39,8 @@ #include <QObject> #include <QProcess> -#include <QQuickView> +#include <QQmlApplicationEngine> +#include <QQuickWindow> #include <QDir> #include <QString> #include <QTimer> @@ -57,9 +58,11 @@ public: void setOutputDir(const QDir &dir); void setOutputFileBaseName(const QString &fileBaseName); void setQmlFileName(const QString &fileName); - void setView(QQuickView *mView); + void setView(QQuickWindow *mWindow); void setHighQuality(bool highQuality); + QQuickWindow *window() const; + void start(); bool hasStarted() const; void waitForFinish(); @@ -75,7 +78,8 @@ private: QString mByzanzOutputFileName; QString mGifFileName; QString mQmlInputFileName; - QQuickView *mView; + QQmlApplicationEngine mEngine; + QQuickWindow *mWindow; bool mHighQuality; int mRecordingDuration; bool mRecordCursor; |