[PyQt] C++ operator-> from python
Phil Thompson
phil at riverbankcomputing.com
Fri Feb 4 13:20:58 GMT 2011
On Fri, 04 Feb 2011 13:53:32 +0100, John Beuving <johnbeuving at gmail.com>
wrote:
> Hi,
>
> I have a lot of C++ database records where the data of the records can
> be accessed through an operator->
> I want to access the data of the record from python. Apparently SIP
> doesn't support operator->.
> I have looked at using __getattr__ to get information from the records,
> which could make it work.
> What is the best way to implement the operator->
Just define a __getattr__ method in your .sip file.
When I added support for it I forgot to add operator-> as a synonym.
Phil
More information about the PyQt
mailing list