[PyQt] inheriting from QObject and dbus.service.Object
Marcos Dione
mdione at grulic.org.ar
Fri Aug 14 14:24:14 BST 2009
On Fri, Aug 14, 2009 at 12:02:47AM +0200, Marcos Dione wrote:
> I'm nearer, but still no cigar. I think I've hit a dbus.service.Object
> bug. see:
>
> http://grulicueva.homelinux.net/~mdione/glob/posts/qobject-dbus/
ok, I fixed it. I had to explicitly make the metaclass' __init_() method
call the inherited __init__() methods by hand. here's the outcome:
MetaQObject= type (QObject)
MetaObject= type (dbus.service.Object)
class MetaPlayer (MetaQObject, MetaObject):
"""Dummy metaclass that allows us to inherit from both QObject and d.s.Object"""
def __init__(cls, name, bases, dct):
MetaObject.__init__ (cls, name, bases, dct)
MetaQObject.__init__ (cls, name, bases, dct)
class Player (dbus.service.Object, QObject):
__metaclass__= MetaPlayer
[...]
--
(Not so) Random fortune:
[...] we think the command-line interface is great. We want everyone to
use it. CLI is good for you: it allows easier reproduction [...], it
allows scripting. SSH and screen are great. That’s the way things should
be done.
-- Thierry Carrez, about requests for server admin GUIs.
More information about the PyQt
mailing list