[Kde-bindings] Qyoto Custom Signal Arguments

Richard Dale Richard_Dale at tipitina.demon.co.uk
Fri Aug 25 17:49:24 UTC 2006

On Thursday 24 August 2006 20:26, Arno Rehn wrote:
> Am Donnerstag, 24. August 2006 20:24 schrieb Richard Dale:
> > On Thursday 24 August 2006 19:07, Arno Rehn wrote:
> > > But there's still one problem: arguments for custom signals don't work.
> > > I took a quick look at the way it is done in qt4-qtruby and it seems to
> > > be nearly the same.
> > > When I watch the variables in the EmitSignal class, there is something
> > > passed to the class. But apparently it isn't processed correctly or so.
> > > Am I right, that QMetaObject::activate() emits a signal?
> > > I don't find any documentation about this method on the Net or in the
> > > Qt docs and it doesn't appear in any of the header-files.
> > > Any ideas what to do?
> >
> > The code to emit signals used to work, and so if it's now stopped it
> > problably is only something minor, and it's a matter of tracing the code
> > through the above steps to see where it goes wrong.
> Everything goes right, and exactly that is the thing that makes me curious.
> The call comes to emitSignal() in the class EmitSignal, the loop goes right
> and _qobj->activate() is called. The signal is emitted, but all arguments
> are 0.
> If I print the contents of, e.g.  s_int, I get a result, so the arguments
> are passed to the class. But it seems as they are not correctly "processed"
> by activate().
I think it used to work with existing C++ signals, so I would try subclassing 
a QPushButton and emitting an existing signal like 'clicked()' that doesn't 
have any parameters to start off with. If it works with existing signals, but 
not custom ones it would mean that the QMetaObject wasn't being created 

> > I think I've changed the QtRuby code a bit since I copied it to use it
> > Qyoto, so it might be worth having a look at it and updating Qyoto. But
> > it's probably best to try and track down the bug first.
> I'll compare the QtRuby code and the Qyoto code, maybe I'll find a
> difference which is quite self-explaining.
OK, but I don't think this bug was in the original QtRuby code, I think it is 
a Qyoto specific one.

-- Richard

More information about the Kde-bindings mailing list