[PyKDE] Problem starting PyQt4 programs from eric3

Detlev Offenbach detlev at die-offenbachs.de
Wed Jan 11 18:04:19 GMT 2006


Am Mittwoch, 11. Januar 2006 12:41 schrieb Andreas Pakulat:
> On 11.01.06 08:15:18, Phil Thompson wrote:
> > On Wednesday 11 January 2006 12:24 am, Andreas Pakulat wrote:
> > > Hi,
> > >
> > > just discovered that I can't seem to start PyQt4 programs that import
> > > QtCore from eric3.
> > >
> > > I get a runtime exception telling me that QtCore and "qt" wrap the
> > > QObject class.
> > >
> > > I'm pretty sure that this is not really an eric3-problem, running such
> > > a program from eric3 is just the easiest way to get this.
> > >
> > > I guess the problem is rather that PyQt or sip do not support to have 2
> > > QObject classes from 2 different libs.
> > >
> > > Phil is there a way to avoid this "clash"? I don't want to have 2
> > > pythons to use PyQt4 from within eric3.
> >
> > I think it's an eric3 bug. It will happen when qt and QtCore are imported
> > into the same interpreter.
>
> It seems that: "It's not a bug, it's a feature". Looks like the
> "default" debug client eric3 uses to execute python programs imports the
> "qt" module automatically. There is a setting to change that and after
> having done so I can now run and debug my PyQt4 program from inside
> eric3.
>

That is correct. Eric3 comes with three debugger (interpreter) types. One that 
requires Qt (3), one without this requirement and a multithreaded variant of 
the non Qt variant. The Qt variant is the default one, but that can be 
changed globally (Configuration dialog) or on a per project basis (Project -> 
Debugger -> Debugger Properties). Eric4 will just contain the non Qt 
interpreter variants unless I receive reports, that this will cause problems.

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de




More information about the PyQt mailing list