Stuck with Qt and Bluetooth

978 views Asked by At

I use Qt 5.4 for Windows and I'm trying to write a basic desktop program. I've tried all the examples for bluetooth bundled with Qt. (Scanning, chat, qml scanning...)

None of them works. I've researched about that and many says "Compile with Dbus enabled". I've searched how to compile with dbus enabled but all of the advice I've found are too complicated for me. I couldn't find an exact solution.

I've added some codes to my .pro file like:

CONFIG+=enable-qdbus
#Default to building glib-dbus based connection
!disable-dbus {
    enable-qdbus {
        CONFIG += qdbus-dbus-connection
    } else {
        CONFIG += glib-dbus-connection
    }
}

CONFIG += config_bluez

None worked. How can i compile with dbus enable? What is my mistake?

0

There are 0 answers