![]() |
DBus a{sv} type in Qt
Hullo,
I'm trying to use BlueZ BT stack in N900 PR 1.2 with Qt 4.6.2. I'm not able to connect to signals that contain a{sv} parameter which I think should be used as QVariantMap in Qt. Connect and signals work if I use Python but for some reason Qt does not accept that QVariantMap parameter. <code> QDBusConnection * m_dbus = new QDBusConnection(QDBusConnection::systemBus()); QDBusMessage message = QDBusMessage::createMethodCall("org.bluez", "/", "org.bluez.Manager", "DefaultAdapter"); QDBusMessage reply = m_dbus->call(message); QString m_path = reply.arguments().first().value<QDBusObjectPath>() .path(); QDBusInterface * interface = new QDBusInterface("org.bluez", m_path, "org.bluez.Adapter", *m_dbus); connect(interface, SIGNAL(DeviceFound(QString, QVariantMap)), this, SLOT(slotDeviceFound(QString, QVariantMap))); </code> |
Re: DBus a{sv} type in Qt
Hi,
Quote:
QDBusInterface doesn't have a signal called "DeviceFound". Which code are you referring to in Python? Any example? Daniel |
Re: DBus a{sv} type in Qt
I got this to work with using <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QVariantMap"/> in DBus xml and then generating the proxy class with qdbusxml2cpp. Connect and signal work just fine when using this generated interface.
I missed this because all other parameters work just fine with just QDBusInterface. |
All times are GMT. The time now is 19:20. |
vBulletin® Version 3.8.8