[PyQt] Using a protected slot (columnResized)

Andreas Pakulat apaku at gmx.de
Wed Dec 26 17:12:33 GMT 2007


On 26.12.07 18:54:25, Noam Raphael wrote:
> 2007/12/26, Andreas Pakulat <apaku at gmx.de>:
> > Sure there is: Listen for the sectionResized signal of the header view.
> >
> Thanks! However, it still doesn't work, for some reason. I added this
> to my code:
> 
> def columnResized(*args):
>     print 'columnResized%s' % repr(args)
> QtCore.QObject.connect(tableView.horizontalHeader(),
> QtCore.SIGNAL("sectionResized(int,int,int)"), columnResized)
> 
> The function is never called. Did I do something wrong?

Yes, you used the wrong kind of arguments to the function defintion.
You're getting self+3 integer arguments, not a list of things.

Andreas

-- 
You shall be rewarded for a dastardly deed.


More information about the PyQt mailing list