SmartSignalsApp.cpp Example File
bpstoqml/src/SmartSignalsApp.cpp
#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
#include <bb/cascades/AbstractPane>
#include <QList>
#include <QDebug>
#include "SmartSignalsApp.hpp"
using namespace bb::cascades;
SmartSignalsApp::SmartSignalsApp() {
QmlDocument *qml = QmlDocument::create("asset:///main.qml");
if (qml->hasErrors()) {
QList<QDeclarativeError> errors = qml->errors();
qDebug() << "Errors occurred parsing qml:";
qDebug() << &errors;
} else {
qml->setContextProperty("cs", this);
AbstractPane *root = qml->createRootObject<AbstractPane>();
Application::instance()->setScene(root);
}
}