aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/d3d11underqml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/scenegraph/d3d11underqml')
-rw-r--r--examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp1
-rw-r--r--examples/quick/scenegraph/d3d11underqml/d3d11squircle.h1
-rw-r--r--examples/quick/scenegraph/d3d11underqml/d3d11underqml.pro4
-rw-r--r--examples/quick/scenegraph/d3d11underqml/main.cpp2
4 files changed, 6 insertions, 2 deletions
diff --git a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp
index f05bf2f843..5737e419b0 100644
--- a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp
+++ b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp
@@ -49,6 +49,7 @@
****************************************************************************/
#include "d3d11squircle.h"
+#include <QtCore/QFile>
#include <QtCore/QRunnable>
#include <QtQuick/QQuickWindow>
diff --git a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h
index be9aadc43b..4be3671d1c 100644
--- a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h
+++ b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h
@@ -59,6 +59,7 @@ class D3D11Squircle : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(qreal t READ t WRITE setT NOTIFY tChanged)
+ QML_ELEMENT
public:
D3D11Squircle();
diff --git a/examples/quick/scenegraph/d3d11underqml/d3d11underqml.pro b/examples/quick/scenegraph/d3d11underqml/d3d11underqml.pro
index 7658a9a813..4f052cf388 100644
--- a/examples/quick/scenegraph/d3d11underqml/d3d11underqml.pro
+++ b/examples/quick/scenegraph/d3d11underqml/d3d11underqml.pro
@@ -2,6 +2,10 @@
QT += qml quick
+CONFIG += qmltypes
+QML_IMPORT_NAME = D3D11UnderQML
+QML_IMPORT_MAJOR_VERSION = 1
+
HEADERS += d3d11squircle.h
SOURCES += d3d11squircle.cpp main.cpp
RESOURCES += d3d11underqml.qrc
diff --git a/examples/quick/scenegraph/d3d11underqml/main.cpp b/examples/quick/scenegraph/d3d11underqml/main.cpp
index d26de1144a..bcefae6cb5 100644
--- a/examples/quick/scenegraph/d3d11underqml/main.cpp
+++ b/examples/quick/scenegraph/d3d11underqml/main.cpp
@@ -56,8 +56,6 @@ int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
- qmlRegisterType<D3D11Squircle>("D3D11UnderQML", 1, 0, "D3D11Squircle");
-
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Direct3D11Rhi);
QQuickView view;