Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QBluetooth on Bootcamp Windows
Forum Updated to NodeBB v4.3 + New Features

QBluetooth on Bootcamp Windows

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 983 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jundl77
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved