[PyKDE] problems with current eric3 and PyQt snapshots on Qt3.0.5

Hans-Peter Jansen hpj at urpla.net
Thu Apr 17 19:23:01 BST 2003


On Wednesday 16 April 2003 19:14, Phil Thompson wrote:
> On Wednesday 16 April 2003 4:41 pm, Hans-Peter Jansen wrote:
> > On Wednesday 16 April 2003 11:59, Phil Thompson wrote:
> > > On Monday 14 April 2003 2:25 pm, Hans-Peter Jansen wrote:
> > > > Thanks, but still no joy, because the crash persists, when
> > > > trying to open the prefs in eric3 (20030413).
> > > >
> > > > I've absolutely no idea, who to blame with this one, but it
> > > > smells like some problem buried in sip (20030405) thread
> > > > handling.
> > >
> > > I can't reproduce this (with Qt 3.1.2). There haven't been any
> > > recent changes related to thread handling.
> >
> > Me neither with Qt 3.1.1, but reliable with 3.0.5. Any ideas, how
> > to dig into this?
>
> No - it sounds like a Qt problem.
>
> There were thread related problems in Qt that were fixed in 3.1.0 -
> but I thought they were Windows only.

I was able to track this problem down to the statements:

	self.buttonOk.setAccel(QString.null)

	self.buttonCancel.setAccel(QString.null)

in the pyuic generated PreferencesForm.languageChange().

Commenting out those lines makes the crash vanish. 

Funny is, I cannot reproduce this effect in a minimal example:

import sys
from qt import *

def done():
   app.exit(0)

app = QApplication(sys.argv)
button = QPushButton("&Hello World", None)
# this will disable the above assigned accelerator
button.setAccel(QString.null)
app.setMainWidget(button)
button.show()
# why does this not work?
#app.connect(button, SIGNAL("clicked()"), lambda: app.exit(0))
app.connect(button, SIGNAL("clicked()"), done)
app.exec_loop()

> Phil

Pete




More information about the PyQt mailing list