O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Checking the broadcaster-receiver communication

To check that the data arrives over the Bluetooth channel, we can fire the cmbroadcast application created in the previous chapter on one of our Bluetooth devices, fire the cmmonitor application on the other Bluetooth device, and use qDebug() to monitor initialization and any incoming readings data. To do that, we first need to create an instance of ReceiverBt in main.cpp, and initialize it:

#include <QApplication>#include <QQmlApplicationEngine>#include "../channels/channel_receiver/receiver_bt.h"int main(int argc, char *argv[]){    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);    QApplication app(argc, argv);    auto receiverChannel = new channels::ReceiverBt(&app); receiverChannel->init(); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required