Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QGuiApplication>
- #include <QQmlApplicationEngine>
- #include <QtQml>
- #include "qmltranslator.h"
- int main(int argc, char *argv[])
- {
- QGuiApplication app(argc, argv);
- // Create an object to work with translations ...
- QmlTranslator qmlTranslator;
- QQmlApplicationEngine engine;
- // and register it as a context in Qml layer
- engine.rootContext()->setContextProperty("qmlTranslator", &qmlTranslator);
- engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
- return app.exec();
- }
Add Comment
Please, Sign In to add comment