[PyKDE] PyQt4, my approach was wrong before or now?

sole at esrf.fr sole at esrf.fr
Sun Mar 5 17:14:11 GMT 2006


Quoting Phil Thompson <phil at riverbankcomputing.co.uk>:

> On Sunday 05 March 2006 2:42 pm, sole at esrf.fr wrote:
> > Quoting Gerard Vermeulen <gerard.vermeulen at grenoble.cnrs.fr>:
> > > On Sun, 05 Mar 2006 14:41:10 +0100
> > >
> > > "V. Armando Sole" <sole at esrf.fr> wrote:
> > > > Hi!
> > > >
> > > > In order to be able to use the same code with PyQt3 and PyQt4, I had
> > > > written a small Qt4.py  wrapper to simplify simple cases.
> > > >
> > > > from PyQt4.QtCore import *
> > > > from PyQt4.QtGui import *
> > >
> > > There are two namespaces Qt: one in QtCore and one in QtGui.
> > > Qt.Vertical is part of QtCore, but this gets wiped out
> > > by your import: from PyQt4.QtGui import *
> >
> > So, the fact it was working till the 20060218-snapshot was merely
> > accidental
> 
> No, until that point the things in the Qt namespace and defined in QtGui 
> hadn't been implemented in PyQt4 because it needed a SIP change to handle the
> 
> split namespace.
> 
> > and now it has been corrected. 
> 
> The current SIP implements the split by putting a Qt in both QtCore and
> QtGui.
> 
> > I'll have to think about an alternative approach.
> 
> I have been persuaded to change the SIP implementation so that Qt only
> appears 
> in QtCore and things get magically added to it when you import QtGui - 
> precisely to avoid bug reports like yours. I might get this finished today.

Great news for me.
I just hope the change will not disturb projects from other people because, as
Gerard says, the strictly correct behaviour is the current one. Anyways, it's
nice not to be too dogmatic ;-)

Thanks a lot,

Armando

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/




More information about the PyQt mailing list