[PyQt] Function-pointer typedef
Phil Thompson
phil at riverbankcomputing.com
Sat Jul 18 22:16:00 BST 2009
On Sat, 18 Jul 2009 23:06:47 +0200, Arve Knudsen <arve.knudsen at gmail.com>
wrote:
> On Sat, Jul 18, 2009 at 10:59 PM, Phil Thompson
> <phil at riverbankcomputing.com
>> wrote:
>
>> On Sat, 18 Jul 2009 22:42:31 +0200, Arve Knudsen
<arve.knudsen at gmail.com>
>> wrote:
>> > Hi Phil
>> >
>> > In my attempt to wrap the new Qt animation classes, as requested by
>> > Jason
>> > H,
>> > I find that I'm not able declare a function-pointer typedef within a
>> class.
>> > According to the SIP syntax specification it seems perfectly possible,
>> > however. Can you please tell me why the following declaration from
>> > QEasingCurve doesn't work:
>> >
>> > class EasingCurve
>> > {
>> > [...]
>> > public:
>> > typedef qreal (*EasingFunction)(qreal progress);
>> > [...]
>> > };
>>
>> It's a bug - just remove the name of the argument.
>
>
> Thanks, you're right. Looks like I'll have to wrap the function-pointer
by
> hand though, am I right
Yes, and depending on the context, it may prove to be difficult.
> (sip says I have to "provide %Metod code")? I'm
> guessing you should fix sip's error message to say "%MethodCode" instead
of
> "%Method code".
Yes - thanks.
Phil
More information about the PyQt
mailing list