#include "view.h"
#include <QDeclarativeView>
+#include <QDeclarativeEngine>
#include <QDebug>
#include <QDir>
#include <QFile>
}
View::View(QWidget *parent) :
- QWidget(parent),
- m_view(new QDeclarativeView(this))
+ QDeclarativeView(parent)
{
showFullScreen();
// This does not seem ot work in harmattan. As a workaround, change dir to
// the qml dir, then load the file.
// m_view->setSource(QUrl::fromLocalFile("qml:main.qml"));
- m_view->setSource(QUrl::fromLocalFile(trueFilePath("qml:main.qml")));
+ qDebug() << "import path list:" << engine()->importPathList();
+ setSource(QUrl::fromLocalFile(trueFilePath("qml:main.qml")));
}
#ifndef QP_VIEW_H
#define QP_VIEW_H
-#include <QWidget>
+#include <QDeclarativeView>
-class QDeclarativeView;
-
-class View : public QWidget
+class View : public QDeclarativeView
{
Q_OBJECT
public:
public slots:
private:
- QDeclarativeView *m_view;
};
#endif // QP_VIEW_H