[PyQt] Re: problem with connected scrollbars

Phil Thompson phil at riverbankcomputing.com
Thu Nov 13 11:02:12 GMT 2008


On Wed, 12 Nov 2008 14:54:55 +0100, Georg Altmann <george at george-net.de>
wrote:
> 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.

This restriction has been relaxed in SIP v4.7.8, so passing an integer
value should now work.

Phil


More information about the PyQt mailing list