move qmlwrapper to subdir

This commit is contained in:
Felix Hammer
2015-08-13 15:35:25 +02:00
parent 959d48f83d
commit d14343b8ac
+29
View File
@@ -0,0 +1,29 @@
#include <QtCore>
#include <QQmlApplicationEngine>
#include <configfile.h>
#include <boost/shared_ptr.hpp>
#include "qmlwrapper.h"
QmlWrapper::QmlWrapper(boost::shared_ptr<ConfigFile> 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()
{
}