mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-26 13:44:34 +00:00
19 lines
387 B
C++
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;
|
||
|
}
|
||
|
}
|
||
|
|