[SIP] How to hide helper functions?

Weitian Leung Just_Fancy at live.com
Sat Jul 2 09:09:34 BST 2022


I have such situation that want to hide the handwritten functions, for example
struct Foo /Abstract/
{
    HRESULT get_Count(long *count /Out/) = 0;
    long getCount();
    %MethodCode
        long count = 0;
        sipCpp->get_Count(&count);
        sipRes = count;
    %End
    %Property(name=Count, get=getCount)
};
the getCount is not the original interface method, I just want to make the get_Count be a property, so write one helper function and use the %Property directive.
But I don't want the user see or call the getCount method directly, only the get_Count or Count property is acceptable.

It is possible do that? Or is any other way to expose get_Count as a property?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220702/ce7278be/attachment-0001.htm>


More information about the PyQt mailing list