Skip to content

Instantly share code, notes, and snippets.

/main.cpp Secret

Created May 12, 2016 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1cb61d25a6c9ef605179ebef3c24ae05 to your computer and use it in GitHub Desktop.
Save anonymous/1cb61d25a6c9ef605179ebef3c24ae05 to your computer and use it in GitHub Desktop.
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include "Filter.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QQmlApplicationEngine engine;
Filter* filter = new Filter(NULL);
engine.rootContext()->setContextProperty("filter", filter);
engine.addImageProvider(QLatin1String("filter"), filter);
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment