25 lines
672 B
C++
25 lines
672 B
C++
#include <QApplication>
|
|
#include <QQmlApplicationEngine>
|
|
#include <QDebug>
|
|
|
|
#include "xcbEventFilter.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
/* create qapp and QML engine */
|
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
QApplication app(argc, argv);
|
|
QQmlApplicationEngine engine;
|
|
engine.load(QUrl(QStringLiteral("qrc:/fookb.qml")));
|
|
|
|
/* Get the flag object */
|
|
QObject *rootObject = engine.rootObjects().first();
|
|
|
|
/* Install event filter to handle mapping change */
|
|
XcbEventFilter *eventFilter = new XcbEventFilter(rootObject);
|
|
app.installNativeEventFilter(eventFilter);
|
|
|
|
/* run application */
|
|
return app.exec();
|
|
}
|