[PyKDE] Problem starting PyQt4 programs from eric3

Andreas Pakulat apaku at gmx.de
Wed Jan 11 18:41:56 GMT 2006


On 11.01.06 19:04:19, Detlev Offenbach wrote:
> 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,

How about adding "(Qt3)" to the label of the default one and change "no
Qt" to "no Qt3"? That would IMHO be more clear as to what the default
client uses, especially as eric3 snapshots supports Qt4 and Qt3.

> on a per project basis (Project -> Debugger -> Debugger Properties).

I just wanted to write that I did not find this. However, with try&error
I found that the directory containing the default DebugClient has
modules for the other ones to.

Could you include the same four Radiobuttons you have in the global
configuration in the project configuration? The same reason as above:
Clarification. Probably with a fith one that uses the global setting.

> Eric4 will just contain the non Qt interpreter variants unless I
> receive reports, that this will cause problems.

Just out of curiosity: What is the benefit of having a debugger that
already imported qt? Running small test scripts without the need to
import qt?

Andreas

-- 
You have an unusual magnetic personality.  Don't walk too close to
metal objects which are not fastened down.




More information about the PyQt mailing list