[PyKDE] signals
M.Chambers
matt at linuxplatform.org
Sat Oct 7 16:39:36 BST 2006
I cut and pasted "collapsed (const QModelIndex & index)" directy from
Assistant, which is how I did it with PtQt3
Changing to this fixed it:
self.connect(self, QtCore.SIGNAL("collapsed (const QModelIndex)"),
self.cbCollapsed);
Matt
On Fri, 2006-10-06 at 13:34 -0700, Jim Bublitz wrote:
> On Friday 06 October 2006 12:22, Andreas Pakulat wrote:
> > On 06.10.06 12:00:27, 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);
> >
> > Because there's a space between the function name and the (. Signal
> > connection is done via string comparison. Also you need to remove the
> > variable name. The signals name and type of the arguments is all you
> > need to use.
>
> Nope - I put spaces between names and parens in connect calls all the time and
> it works fine.
>
> It's the 'index' identifier that's causing the problem as far as I can tell,
> as you noted below. It's not part of the C++ signature for the method/signal.
>
> Also, const, and & are part of the C++ signature, which is what SIGNAL needs
> to pass to make the connection. Those are correct.
>
> Jim
>
> _______________________________________________
> PyKDE mailing list PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
More information about the PyQt
mailing list