[PyQt] Re: problem with connected scrollbars

Vicent Mas uvemas at gmail.com
Wed Nov 12 14:32:47 GMT 2008


Hi,

in http://www.riverbankcomputing.co.uk/static/Docs/sip4/sipref.html one can 
read:

2   Potential Incompatibilities with Earlier Versions
2.1   SIP v4.7.8

This version allows a Python int object to be passed whenever an enum is 
expected. This can mean that two signatures that were different with prior 
versions are now the same as far as Python is concerned. The Constrained 
annotation can now be applied to an enum argument to revert to the earlier 
behaviour.

I'm using sip 4.7.6. I suppose that it means that my code will work after 
updating to version 4.7.8 (although I don't know anything about sip, so I may 
be wrong). I'll try.

Regards


El Wednesday 12 November 2008 Georg Altmann escribió:
> Vicent Mas schrieb:
> > Hi,
> >
> > thanks for your answer. I've been working about the TypeError and I've
> > found that the call
> >
> > my_scrollbar.triggerAction(QtGui.QAbstractSlider.SliderSingleStepAdd)
> >
> > works
> >
> > but the (apparently equivalent) call
> >
> > my_scrollbar.triggerAction(1)
> >
> > fails raising the TypeError. However QAbstractSlider.SliderSingleStepAdd
> > is supposed to have an integer value of 1, isn't it? At least this is
> > what I understand when reading the Qt docs.
>
> No, its an enum. It looks like int is not implicitly converted to the
> required enum type. Interesting. Probably there is more info in the SIP
> docs.
>




-- 
::

	Share what you know, learn what you don't




More information about the PyQt mailing list