4
0
mirror of https://github.com/QuasarApp/SimpleQmlNotify.git synced 2025-05-04 01:09:36 +00:00
SimpleQmlNotify/qmlnotifyservice.cpp
2019-11-19 15:20:38 +03:00

19 lines
387 B
C++

#include "notificationservice.h"
#include "qmlnotifyservice.h"
#include <QQmlApplicationEngine>
#include <QQmlContext>
namespace QmlNotificationService {
bool init(QQmlApplicationEngine *engine) {
auto root = engine->rootContext();
if (!root)
return false;
root->setContextProperty("notificationService", NotificationService::getService());
return true;
}
}