diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-05-05 09:37:21 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-24 11:10:47 +0200 |
commit | 04c4055ad9eef2247d2abfae126c2bc8b90bf847 (patch) | |
tree | 96866d9084e75a758fb9567ebbe00677ba2d268f /examples | |
parent | 727d7f83735f5128058d661a1633a2b435fcf4b5 (diff) |
Quick3D independent library
In order to be able to have Qt3D work without dependencies to the Qml module,
a dedicated Quick3D library has been set up for that purpose. It offers a
QQuickWindow class which extends Qt3D::Window and allows to load a Qml source
file.
Examples have been updated to use QuickWindow.
Note: There are still dependencies to the Qml module in Qt3DCore and
Qt3DRenderer. This patch is a first step toward the removal of those. Follow
up commits will completely remove those dependencies.
Change-Id: I603eec8fb01b3706f648550b43b62356b0b4b4ac
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/assimp/assimp.pro | 2 | ||||
-rw-r--r-- | examples/assimp/main.cpp | 4 | ||||
-rw-r--r-- | examples/gltf/gltf.pro | 2 | ||||
-rw-r--r-- | examples/gltf/main.cpp | 4 | ||||
-rw-r--r-- | examples/simple-qml/main.cpp | 4 | ||||
-rw-r--r-- | examples/simple-qml/simple-qml.pro | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/examples/assimp/assimp.pro b/examples/assimp/assimp.pro index 3c56b754f..e2871ca80 100644 --- a/examples/assimp/assimp.pro +++ b/examples/assimp/assimp.pro @@ -2,7 +2,7 @@ TEMPLATE = app SOURCE += main.cpp -QT += qml quick 3dcore 3drenderer +QT += qml quick 3dcore 3drenderer 3dquick OTHER_FILES += main.qml diff --git a/examples/assimp/main.cpp b/examples/assimp/main.cpp index 3e7412ffd..3211f0b8b 100644 --- a/examples/assimp/main.cpp +++ b/examples/assimp/main.cpp @@ -41,7 +41,7 @@ #include <exampleresources.h> -#include <window.h> +#include <quickwindow.h> #include <rendereraspect.h> #include <QGuiApplication> @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; + Qt3D::Quick::QuickWindow view; view.registerAspect(new Qt3D::RendererAspect()); view.setSource(QUrl("qrc:/main.qml")); view.show(); diff --git a/examples/gltf/gltf.pro b/examples/gltf/gltf.pro index a439d6a12..5a1dde26d 100644 --- a/examples/gltf/gltf.pro +++ b/examples/gltf/gltf.pro @@ -1,6 +1,6 @@ TEMPLATE = app -QT += 3dcore 3drenderer qml quick +QT += 3dcore 3drenderer 3dquick qml quick include("../exampleresources/exampleresources.pri") diff --git a/examples/gltf/main.cpp b/examples/gltf/main.cpp index 020401d9f..7fc2a5ecf 100644 --- a/examples/gltf/main.cpp +++ b/examples/gltf/main.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include <exampleresources.h> -#include <window.h> +#include <quickwindow.h> #include <rendereraspect.h> #include <QGuiApplication> @@ -52,7 +52,7 @@ int main(int argc, char* argv[]) initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; + Qt3D::Quick::QuickWindow view; view.registerAspect(new Qt3D::RendererAspect()); view.setSource(QUrl("qrc:/main.qml")); view.show(); diff --git a/examples/simple-qml/main.cpp b/examples/simple-qml/main.cpp index bb2ac5898..ad8802ce6 100644 --- a/examples/simple-qml/main.cpp +++ b/examples/simple-qml/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <window.h> +#include <quickwindow.h> #include <rendereraspect.h> @@ -50,7 +50,7 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - Qt3D::Window view; + Qt3D::Quick::QuickWindow view; view.registerAspect(new Qt3D::RendererAspect()); // There should be some synchronising mechanism to make sure // the source is set after alll aspects have been completely initialized diff --git a/examples/simple-qml/simple-qml.pro b/examples/simple-qml/simple-qml.pro index b534097a5..8df6820f3 100644 --- a/examples/simple-qml/simple-qml.pro +++ b/examples/simple-qml/simple-qml.pro @@ -1,6 +1,6 @@ TEMPLATE = app -QT += 3dcore 3drenderer qml quick +QT += 3dcore 3drenderer 3dquick qml quick include("../exampleresources/exampleresources.pri") |