[PyQt] Using a protected slot (columnResized)
Andreas Pakulat
apaku at gmx.de
Wed Dec 26 18:14:33 GMT 2007
On 26.12.07 19:25:35, Noam Raphael wrote:
> 2007/12/26, Andreas Pakulat <apaku at gmx.de>:
> > 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.
> >
> No, the function is ok - if the function is defined like that, it
> means that it can get any number of arguments, and they will get into
> a tuple named "args". Just to make sure, I changed it into a function
> that gets exactly three arguments (I don't need self, since it's not a
> method), and it continued to do nothing... :(
Then you need to provide a minimal self-contained example that
demonstrates the problem.
Andreas
--
You attempt things that you do not even plan because of your extreme stupidity.
More information about the PyQt
mailing list