[PyKDE] signals

Andreas Pakulat apaku at gmx.de
Fri Oct 6 20:45:28 BST 2006

On 06.10.06 11:15:20, Joshua J. Kugler wrote:
> On Friday 06 October 2006 11:00, Matt Chambers wrote:
> > Any guesses as to why this line would not conncet the signal?  Using a
> > treeview.
> >
> > self.connect(self, QtCore.SIGNAL("collapsed (const QModelIndex &
> > index)"), self.cbCollapsed);
> 1, you are including parameter names in the signal


> 2. you are connecting a parameterized signal to a non-parameterized signal

Wrong. Connection a signal to a slot with less parameters than the
signals has is perfectly Ok. Unfortunately I cannot find the docs where
it states so, but you can easily try it. (Or does PyQt prohibit this??)

> 3. You have an & in a Python program...not correct syntax, IIRC

That is inside a string literal, no problem here.

> 4. The const keyword is not a Python keyword, but that wouldn't raise a flag 
> here since SIGNAL connects on function names, not parameter modifiers.

No it doesn't. It uses functionname+parameter types, that's why you use
a string for the signal signature.


You are only young once, but you can stay immature indefinitely.

More information about the PyQt mailing list