[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] SIP template
From:       Shaheed Haque <srhaque () theiet ! org>
Date:       2017-08-08 21:12:36
Message-ID: CAHAc2jeyBBEn9taLjYW8r8KWdB6ipv1XsNsxT_TTHPCKiRbzrg () mail ! gmail ! com
[Download RAW message or body]

On 8 August 2017 at 17:23, Phil Thompson <phil@riverbankcomputing.com> wrote:
> On 2 Aug 2017, at 9:21 am, Shaheed Haque <srhaque@theiet.org> wrote:
> > 
> > Hi,
> > 
> > On 18 May 2017 at 13:14, Denis Rouzaud <denis.rouzaud@gmail.com> wrote:
> > > 
> > > Sorry, for the noise.
> > > 
> > > I missed the second typedef in the ModuleHeaderCode, it works!
> > > Thanks to David, Phil and Shaheed for the hints!
> > 
> > Is there a variation on this technique that works for nested classes?
> > It turns out that in all 17 places this affects PyKF5 involve nested
> > classes, and attempting to modify this SIP:
> > 
> > =============
> > namespace KContacts
> > {
> > class AddresseeList: QVector<KContacts::Addressee>
> > {
> > =============
> > 
> > into this SIP:
> > 
> > =============
> > namespace KContacts
> > {
> > %TypeHeaderCode
> > typedef QVector<KContacts::Addressee> foo_t;
> > %End
> > typedef QVector<KContacts::Addressee> foo_t;
> > class AddresseeList: KContacts::foo_t
> > {
> > =============
> > 
> > only results in:
> > 
> > sip: tmp/KContacts/KContacts/AddresseeList.sip:121: Super-class list
> > contains an invalid type
> > 
> > I stared a the code that emits the message in parser.y (and also tried
> > moving foo_t to global scope), without the solution becoming obvious.
> > So, any clues or ideas welcomed!
> 
> PyQt has the same problem with QPolygon. The workaround is to say that \
> AddresseeList does not have a super-class and to add any QVector methods you want \
> to AddresseeList. See qpolygon.sip in PyQt.

Thanks Phil...

> 
> Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic