[PyKDE] Wrapped classes without constructor

Phil Thompson phil at riverbankcomputing.co.uk
Tue Jun 7 17:24:44 BST 2005


On Tuesday 07 June 2005 3:56 pm, Denis S. Otkidach wrote:
> On Tue, 7 Jun 2005 15:20:40 +0100 (BST)
>
> "Phil Thompson" <phil at riverbankcomputing.co.uk> wrote:
> > > I have several classes which shouldn't be initialized by user.  Neither
> > > /Abstract/, nor declaring constructor private helps, since in both
> > > cases generated class doesn't have destructor, which in my case is
> > > mandatory.  I use the following code to clear constructor:
> > >
> > > %PreInitialisationCode
> > >     sipType_MyClass.td_init = 0;
> > > %End
> > >
> > > Is there a better way I've missed?
> >
> > What version of SIP?
>
> $ sip -V
> 4.2.1 (4.2.1-297)
>
> > The current snapshot *might* be more helpful as there
> > have been changes in this area.
>
> Thanks, after upgrade to recent snapshot wrapped class has destructor
> with /Abstract/.  But the class is added to module namespace.  Could the
> latter be controlled too?

No, only because I don't think it's a good idea. You know how to hack it 
yourself anyway.

Phil




More information about the PyQt mailing list