Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

main.cpp 847 Bytes
Newer Older
1
#include <QApplication>
Camilo Higuita's avatar
src  
Camilo Higuita committed
2
#include <QQmlApplicationEngine>
Camilo Higuita's avatar
Camilo Higuita committed
3
#include <QFontDatabase>
4
#include <QQmlContext>
Camilo Higuita's avatar
Camilo Higuita committed
5
#include <QQuickStyle>
6 7
#include "src/utils/pix.h"

Camilo Higuita's avatar
Camilo Higuita committed
8 9 10
//#ifdef Q_OS_ANDROID
//#include "./3rdparty/kirigami/src/kirigamiplugin.h"
//#endif
Camilo Higuita's avatar
src  
Camilo Higuita committed
11 12 13 14 15

int main(int argc, char *argv[])
{
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

16
    QApplication app(argc, argv);
Camilo Higuita's avatar
src  
Camilo Higuita committed
17

Camilo Higuita's avatar
Camilo Higuita committed
18 19
    QFontDatabase::addApplicationFont(":/utils/materialdesignicons-webfont.ttf");

20 21 22
    //    #ifdef Q_OS_ANDROID
    //        KirigamiPlugin::getInstance().registerTypes();
    //    #endif
Camilo Higuita's avatar
Camilo Higuita committed
23

Camilo Higuita's avatar
src  
Camilo Higuita committed
24
    QQmlApplicationEngine engine;
25 26 27
    auto context = engine.rootContext();

    Pix pix;
Camilo Higuita's avatar
Camilo Higuita committed
28
    context->setContextProperty("pix", &pix);
29

Camilo Higuita's avatar
src  
Camilo Higuita committed
30 31 32 33 34 35
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
    if (engine.rootObjects().isEmpty())
        return -1;

    return app.exec();
}