diff --git a/src/gui/qml/cpp/qmlwrapper.cpp b/src/gui/qml/cpp/qmlwrapper.cpp new file mode 100644 index 00000000..e3e13011 --- /dev/null +++ b/src/gui/qml/cpp/qmlwrapper.cpp @@ -0,0 +1,29 @@ +#include +#include +#include +#include + +#include "qmlwrapper.h" + +QmlWrapper::QmlWrapper(boost::shared_ptr c) + :QObject(), myConfig(c) +{ + qDebug("QmlWrapperKonstruktor"); + myEngine.reset(new QQmlApplicationEngine); + +// Add c++ content here +// myEngine.rootContext()->setContextProperty("model1", &model1); + + myEngine->load(QUrl(QStringLiteral("qrc:/main.qml"))); +} + +QmlWrapper::~QmlWrapper() +{ + myEngine->deleteLater(); +} + +QmlWrapper::QmlWrapper(const QmlWrapper&) + :QObject() +{ + +}