summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth')
-rw-r--r--examples/bluetooth/heartrate-server/heartrate-server.pro1
-rw-r--r--examples/bluetooth/heartrate-server/main.cpp8
2 files changed, 9 insertions, 0 deletions
diff --git a/examples/bluetooth/heartrate-server/heartrate-server.pro b/examples/bluetooth/heartrate-server/heartrate-server.pro
index edd011b9..0333ffc9 100644
--- a/examples/bluetooth/heartrate-server/heartrate-server.pro
+++ b/examples/bluetooth/heartrate-server/heartrate-server.pro
@@ -2,6 +2,7 @@ TEMPLATE = app
TARGET = heartrate-server
QT = core bluetooth
+android: QT += gui
CONFIG += c++11
SOURCES += main.cpp
diff --git a/examples/bluetooth/heartrate-server/main.cpp b/examples/bluetooth/heartrate-server/main.cpp
index ea01d07d..7986edd6 100644
--- a/examples/bluetooth/heartrate-server/main.cpp
+++ b/examples/bluetooth/heartrate-server/main.cpp
@@ -57,7 +57,11 @@
#include <QtBluetooth/qlowenergyservice.h>
#include <QtBluetooth/qlowenergyservicedata.h>
#include <QtCore/qbytearray.h>
+#ifndef Q_OS_ANDROID
#include <QtCore/qcoreapplication.h>
+#else
+#include <QtGui/qguiapplication.h>
+#endif
#include <QtCore/qlist.h>
#include <QtCore/qloggingcategory.h>
#include <QtCore/qscopedpointer.h>
@@ -66,7 +70,11 @@
int main(int argc, char *argv[])
{
//QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
+#ifndef Q_OS_ANDROID
QCoreApplication app(argc, argv);
+#else
+ QGuiApplication app(argc, argv);
+#endif
//! [Advertising Data]
QLowEnergyAdvertisingData advertisingData;