[PyQt] syntax for converting C++ class template function to sip?
Qin Shen
jeanshen at tippett.com
Thu Sep 30 22:41:44 BST 2010
Phil Thompson wrote:
> On Thu, 30 Sep 2010 12:06:58 -0700, Qin Shen <jeanshen at tippett.com> wrote:
>
>> I have template functions inside a non-template class.
>>
>> template <typename T>
>> List(const T &value);
>>
>> template <typename T>
>> List &append(const T &value);
>>
>> I copied them over to a sip file without changing their syntax. SIP
>> complains about the
>> syntax error. I couldn't seem to find any related info from the SIP
>> reference guide.
>> Is there anything specific I have to do to make it work?
>>
>
> Look at PyQt's qlist.sip file.
>
Thanks, Phil. This is a simple list type which I can do the same as
Qlist does.
But what about any random template member function such as,
template <typename T>
FilterBy &And(const std::string &path,
const std::string &relation,
const T &value)
Do I need to do something similar to what this post said?
http://www.mail-archive.com/pyqt@riverbankcomputing.com/msg00531.html
Thanks a lot,
-Jean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100930/e8dc4684/attachment.html>
More information about the PyQt
mailing list