You are not logged in.

#1 2012-03-21 00:46:29

KenjiTakahashi
Member
From: outside the universe
Registered: 2011-06-22
Posts: 24
Website

PyQt + qtdbus + MPRIS2 GetTracksMetadata

Hi all,

I'm writing an MPRIS2 module for one of my projects using PyQt and qtdbus.
Everything were working fine so far, but I suddenly came across a little strange problem with GetTracksMetadata method. The docs tell me that it's result type is "aa{sv}" which translates to Qt's "QList<QVariantMap>".
So I coded it as usual:

class MPRIS2Tracklist(QtDBus.QDBusAbstractAdaptor):
    @pyqtSlot("QStringList", result="QList<QVariantMap>")
    def GetTracksMetadata(self, as):
        pass # irrevelant

Yet not luck this time, because trying to run it I got this message:

C++ type 'QList<QVariantMap>' is not supported as a pyqtSlot result type

Strange yikes.
I then tried to define it as "general" slot or even no slot at all and then define Introspection manually (using Q_CLASSINFO), but still nothing.

Anyone knows of a way around it or is it just undoable?

Offline

Board footer

Powered by FluxBB