Qt, multiple inheritance: QApplication and new-style class not possible

John J. Lee jjl at pobox.com
Wed May 12 16:14:19 EDT 2004


Sibylle Koczian <Sibylle.Koczian at Bibliothek.Uni-Augsburg.de> writes:
[...]
> a) use SIP v4, but it's pre-release. Moreover I'm just starting with
[...]

I'd say the acceptability of this depends on what kinds of people the
program needs to be distributed to -- yourself being a special case of
distributee :-)  If I know I'll never distribute something, or won't
for, say, a year or so, I feel few qualms about using new code.
Depends what people have said about the stability of the code, of
course, but I'd be surprised if Phil Thompson's pre-release code was
bug-ridden.


> Linux anyway, so I'd like to keep to ready-made rpm packages for my
> distribution (SuSE 9.1) and I can't find any.

If you want to get into good habits, you could make your own rpm by
copying the spec files from old sip / PyQt packages -- it's not too
hard, I'm told.

Personally, I have slovenly habits and just compile from the original
tarball when it's not on a distro CD or automatically fetch-able with
dependencies (using apt-get, in my case).


> b) make MyAppClass a classic class.

A shame to lose properties, assuming you have a good use for them.


> c) instead of deriving my QAppClass from QApplication and from
> MyAppClass, derive it only from QApplication and put a reference to a
> MyAppClass instance into it as an attribute.
> 
> What's the best way (and why),

c).  :-)


> or is there a d)?

Surely.


John



More information about the Python-list mailing list