[PyKDE] Wrapped classes without constructor

Phil Thompson phil at riverbankcomputing.co.uk
Tue Jun 7 15:20:40 BST 2005

> 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? The current snapshot *might* be more helpful as there
have been changes in this area.

> Another problem with this class is that I don't like it to be exposed in
> module namespace.  It's easy to remove it from module dictionary in
> %PostInitialisationCode section, but I wonder if there is a way to avoid
> its inclusion?



More information about the PyQt mailing list