QBluetooth on Bootcamp Windows
-
Hi so all I am trying to do is to find all surrounding bluetooth devices and output their data like in the qt-bluetooth documentation, but for some reason the discoveryAgent object does not find anything despite my computer having a bluetooth connection
@
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "QDebug"MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); // Create a discovery agent and connect to its signals QBluetoothDeviceDiscoveryAgent *discoveryAgent = new QBluetoothDeviceDiscoveryAgent(this); connect(discoveryAgent, SIGNAL(deviceDiscovered(const QBluetoothDeviceInfo&)), this, SLOT(deviceDiscovered(const QBluetoothDeviceInfo&))); // Start a discovery discoveryAgent->start(); qDebug() <<"bt created"; } MainWindow::~MainWindow() { delete ui; } void MainWindow::deviceDiscovered(const QBluetoothDeviceInfo &device) { qDebug() << "Found new device:" << device.name() << '(' << device.address().toString() << ')'; }
@
When I do @discoverAgent -> isActive();@
false is returned despite the start message allready being sent, so what is wrong? Please help me!!
I am on a mac running windows via bootcamp, maybe qt can't find my bluetooth because of that? however I also have a bluetooth dongle and it doesnt work with that either.
-
Hi and welcome to devnet,
IIRC Currently the bluetooth module is supported on Linux with BlueZ 4.x, blackberry and since 5.3 also android