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. QtBluetooth on Windows - working combination of Qt Version and Compiler
Forum Update on Monday, May 27th 2025

QtBluetooth on Windows - working combination of Qt Version and Compiler

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 834 Views
  • 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.
  • C Offline
    C Offline
    chrizbee
    wrote on 30 Oct 2020, 11:58 last edited by chrizbee
    #1

    I've tested the official Bluetooth Scanner Example on multiple Qt versions and compilers and am not quite getting it to work as it should...
    I'm using Windows 10 Pro Version 1909.
    Bluetooth logging was enabled with:

    QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
    

    Qt Version 5.12.9 with MinGW 64bit

    qt.bluetooth: Dummy backend running. Qt Bluetooth module is non-functional. 
    

    Qt Version 5.12.9 with MSVC 2017 64bit
    I didn't test this version of Qt with MSVC since I'm already on Visual Studio 2019 which needs extra effort in setting up with Qt MSVC 2017.
    Can anyone confirm, that this combination is working?

    Qt Version 5.15.1 with MinGW 64bit
    The scanner is able to discover the device (correct address + name of my phone).

    qt.bluetooth.windows: Found device:  "Galaxy S10e" "C0:DC:DA:DF:F6:CD"
    

    Upon pairing it yields Unimplemented code.

    Qt Version 5.15.1 with MSVC 2019 64bit
    The scanner is discovering some wild addresses (not the address of my phone).
    Pairing to any of these will neither work nor output anything to the console.

    qt.bluetooth.winrt: Worker started
    qt.bluetooth.winrt: BT  scan completed
    qt.bluetooth.winrt: BTLE  scan completed
    qt.bluetooth.winrt: onBluetoothLEDeviceFound: No device given
    qt.bluetooth.winrt: Discovered BTLE device:  "75561057610969" "Bluetooth 44:b8:ed:ff:6c:d9" Num UUIDs 0 RSSI: -84 Num manufacturer data 0
    qt.bluetooth.winrt: Discovered BTLE device:  "116173702332376" "Bluetooth 69:a8:cc:42:7f:d8" Num UUIDs 0 RSSI: -85 Num manufacturer data 1
    

    Any ideas which combination of Qt and compiler produces an actually working bluetooth scanner?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on 30 Oct 2020, 13:38 last edited by kuzulis
      #2
      1. The full functionality suports only with the UWP backend on Windows 10 && MSVC compiler (for both LE && Classic).
      2. The almost full functionality supports with Win32 API backend (for any windows && compilers):
        • LE supports since Windows 8, but Classic supports for all Windows versions.
        • Win32 API does not support programmatically pairing for the LE devices (Windows does not provided a public API for that). In this case you need to pair to a found LE devices manually, using the Windows in-box application.
      C 1 Reply Last reply 30 Oct 2020, 15:45
      1
      • C Offline
        C Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on 30 Oct 2020, 13:44 last edited by
        #3

        @chrizbee said in QtBluetooth on Windows - working combination of Qt Version and Compiler:

        I didn't test this version of Qt with MSVC since I'm already on Visual Studio 2019 which needs extra effort in setting up with Qt MSVC 2017.

        No, the ABI of MSVC2017 and MSVC2019 is binary compatible. That's the reason that there is no extra Qt package for MSVC2019 - it's not needed.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        0
        • K kuzulis
          30 Oct 2020, 13:38
          1. The full functionality suports only with the UWP backend on Windows 10 && MSVC compiler (for both LE && Classic).
          2. The almost full functionality supports with Win32 API backend (for any windows && compilers):
            • LE supports since Windows 8, but Classic supports for all Windows versions.
            • Win32 API does not support programmatically pairing for the LE devices (Windows does not provided a public API for that). In this case you need to pair to a found LE devices manually, using the Windows in-box application.
          C Offline
          C Offline
          chrizbee
          wrote on 30 Oct 2020, 15:45 last edited by chrizbee
          #4

          @kuzulis
          Thanks! Do you have an official source for that?

          @Christian-Ehrlicher
          MSVC 2017 and MSVC 2019 might be binary compatible, but they must've changed something with the include paths.
          I'm getting "stddef.h": No such file or directory after a fresh install of both Qt 5.12.9 MSVC 64bit and Visual Studio 2019.
          I can fix it by manually appending the include path or setting PATH itself, but it's not the best way...
          Whereas Qt 5.15.1 MSVC 2019 64bit works fine out of the box.

          C 1 Reply Last reply 30 Oct 2020, 15:51
          0
          • C chrizbee
            30 Oct 2020, 15:45

            @kuzulis
            Thanks! Do you have an official source for that?

            @Christian-Ehrlicher
            MSVC 2017 and MSVC 2019 might be binary compatible, but they must've changed something with the include paths.
            I'm getting "stddef.h": No such file or directory after a fresh install of both Qt 5.12.9 MSVC 64bit and Visual Studio 2019.
            I can fix it by manually appending the include path or setting PATH itself, but it's not the best way...
            Whereas Qt 5.15.1 MSVC 2019 64bit works fine out of the box.

            C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 30 Oct 2020, 15:51 last edited by Christian Ehrlicher
            #5

            @chrizbee Qt does not mess up the system include paths...

            appending the include path or setting PATH

            I don't know what PATH should have to do with a compiler include path nor why I should add a default include path to my pro (or cmake) file - looks like your compiler setup is incorrect.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0

            1/5

            30 Oct 2020, 11:58

            • Login

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