Re: [PyQt] Multiple inheritance involving KXMLGUIClient does not work?

2007-08-11 Thread Jim Bublitz
On Saturday 11 August 2007 11:48, Adeodato Simó wrote:
 Hello.

 I'm having problems with KXMLGUIClient; in particular, it seems
 subclassing from it does not work when multiple inheritance is involved.
 See the script below. If this gets fixed, the attached example should
 work as well.

 (I seem to be pushing PyKDE to its limits, and I've already found three
 non-working features which I need for my application. As I've said
 before, I understand that you're not very inclined to fix them for KDE 3,
 but what are the odds that they'll work in KDE 4? I guess my application
 can live without them until then, but I'd like to know if the future
 will indeed be better. I'm afraid all I can provide is working/non-working
 C++/Python examples.)

sip doesn't support multiple inheritance in Python classes . It does support 
C++ classes which have multiple base classes, so you could create your
own C++ classes that inherit from KXMLGuiClient and QObject and wrap them. 

It won't work in PyKDE4 either. It won't change unless Phil modifies sip, and 
I suspect there are good reasons why that isn't going to happen, but can't 
speak for Phil.

Jim

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Multiple inheritance involving KXMLGUIClient does not work?

2007-08-11 Thread Phil Thompson
On Saturday 11 August 2007 8:17 pm, Jim Bublitz wrote:
 On Saturday 11 August 2007 11:48, Adeodato Simó wrote:
  Hello.
 
  I'm having problems with KXMLGUIClient; in particular, it seems
  subclassing from it does not work when multiple inheritance is involved.
  See the script below. If this gets fixed, the attached example should
  work as well.
 
  (I seem to be pushing PyKDE to its limits, and I've already found three
  non-working features which I need for my application. As I've said
  before, I understand that you're not very inclined to fix them for KDE 3,
  but what are the odds that they'll work in KDE 4? I guess my application
  can live without them until then, but I'd like to know if the future
  will indeed be better. I'm afraid all I can provide is
  working/non-working C++/Python examples.)

 sip doesn't support multiple inheritance in Python classes . It does
 support C++ classes which have multiple base classes, so you could create
 your own C++ classes that inherit from KXMLGuiClient and QObject and wrap
 them.

 It won't work in PyKDE4 either. It won't change unless Phil modifies sip,
 and I suspect there are good reasons why that isn't going to happen, but
 can't speak for Phil.

The good reason is that it's impossible to implement without a standard way 
for creating new C++ types dynamically.

Phil

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt