[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Solid in Python
From:       Kevin Ottens <ervin () kde ! org>
Date:       2010-06-15 12:41:54
Message-ID: 201006151442.04360.ervin () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Tuesday 15 June 2010 13:32:49 Stefan Majewsky wrote:
> On Tuesday 15 June 2010 13:24:38 Thomas Olsen wrote:
> > QObject.connect(Solid.Networking.Notifier, SIGNAL("statusChanged()"),
> > self.netstate_changed)
> > 
> > Which gives me these errors:
> >     QObject.connect(Solid.Networking.Notifier, SIGNAL("statusChanged()"),
> > 
> > self.netstate_changed)
> > 
> > TypeError: arguments did not match any overloaded call:
> >   QObject.connect(QObject, SIGNAL(), QObject, SLOT(),
> > 
> > Qt.ConnectionType=Qt.AutoConnection): argument 1 has unexpected type
> > 'PyQt4.QtCore.pyqtWrapperType'
> 
> I have no experience with PyKDE at all, but the message looks to me like
> "Solid.Networking.Notifier" is a type, i.e. you need to do something like
> 
> instance = Solid.Networking.Notifier()
> QObject.connect(instance, ...)

It is indeed a type, but you can't create instances of it, it's a singleton. 
To access its instance you'd write:
Solid::Networking::notifier() in C++; which would probably give in python:
Solid.Networking.notifier()

As for what's on api.kde.org I'm surprised... there's far more in the headers 
but the table of content somehow seems busted right now. And indeed withough 
the apidox it's not easy to find this one on the python side.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud patron of KDE, http://www.kdab.com

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic