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

List:       kde-devel
Subject:    Re: Solid in Python
From:       Thomas Olsen <tanghus () gmail ! com>
Date:       2010-06-15 13:11:53
Message-ID: 201006151511.53920.tanghus () gmail ! com
[Download RAW message or body]

On Tuesday 15 June 2010 14:41:54 Kevin Ottens wrote:
> 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()

And I was using Notifier instead of 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.

It's kinda try and fail or however the saying goes :-)
I tried to get this working last year but eventually gave up. Now it seems 
that some ppl are actually using my Plasmoids so I figured I ought to give it 
a go again :-)

-- 
Best Regards / Med venlig hilsen

Thomas Olsen
 
>> 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