-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
24 lines (19 loc) · 721 Bytes
/
main.cpp
File metadata and controls
24 lines (19 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "QmlBanner.h"
#include "QmlInterstitialAd.h"
#include "QmlRewardedVideoAd.h"
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
/* Admob */
qmlRegisterType<QmlBanner>("QmlBanner", 1, 0, "QmlBanner");
qmlRegisterType<QmlInterstitialAd>("QmlInterstitialAd", 1, 0, "QmlInterstitialAd");
qmlRegisterType<QmlRewardedVideoAd>("QmlRewardedVideoAd", 1, 0, "QmlRewardedVideoAd");
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
return app.exec();
}