From 62df25ce8e090f53aef822c2b22c754fd4fca3e1 Mon Sep 17 00:00:00 2001 From: marcin Date: Mon, 7 Jul 2014 19:08:30 +0200 Subject: first push --- main.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 main.cpp (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp new file mode 100644 index 00000000..10743122 --- /dev/null +++ b/main.cpp @@ -0,0 +1,20 @@ +#include +#include + +#include "filter.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + filter *eventFilter = new filter; + app.installEventFilter(eventFilter); + + QQmlApplicationEngine engine; + engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); + QObject *rootObject = engine.rootObjects().first(); + + QObject::connect(eventFilter, SIGNAL(ctrlPressed()), rootObject, SLOT(ctrlKeyPressed())); + QObject::connect(eventFilter, SIGNAL(ctrlReleased()), rootObject, SLOT(ctrlKeyReleased())); + + return app.exec(); +} -- cgit v1.2.3