Re: [PyQt] PyQt event management

2012-04-16 Thread Phil Thompson
On Mon, 16 Apr 2012 18:30:07 +0200, Pierre Barthelemy wrote: > Dear all, > > I defined a few plot classes, children of qwidget, to handle chaco plots. I > would like to have a way to connect a few functions to the event of > clicking inside the window that i create. I have tried to implement a fe

[PyQt] PyQt event management

2012-04-16 Thread Pierre Barthelemy
Dear all, I defined a few plot classes, children of qwidget, to handle chaco plots. I would like to have a way to connect a few functions to the event of clicking inside the window that i create. I have tried to implement a few events. In this class, the close event works well. But the other don't

[PyQt] PSA: don't use open() in generators in QThreads

2012-04-16 Thread Andrew Suffield
http://bugs.python.org/issue14432 Looks like python will crash if you do any of the operations affected by restricted execution (create file objects, meddle with __dict__, etc) from a generator that was created in an older iteration of the event loop. The main python thread should be safe, since

Re: [PyQt] Signals arriving after proxy slots deleted

2012-04-16 Thread Phil Thompson
On Mon, 16 Apr 2012 10:59:20 +0100, Andrew Suffield wrote: > Pretty sure it's a pyqt bug, in deleteSlotProxies: > > if (QThread::currentThread() == up->thread()) > delete up; > else > up->deleteLater(); > > http://qt-project.org/doc/qt-4.8/

Re: [PyQt] Possible QTreeWidgetItem constructor bug

2012-04-16 Thread Phil Thompson
On Mon, 16 Apr 2012 14:46:54 +1200, Glenn Ramsey wrote: > If this QTreeWidgetItem constructor is called with a single string instead > of a > list of strings for the "strings" parameter, then on my system (Win 7, > Python > 2.6.5, Qt 4.7.4, PyQt 4.8.5) it crashes the python interpreter. > > QTr

Re: [PyQt] Signals arriving after proxy slots deleted

2012-04-16 Thread Andrew Suffield
Pretty sure it's a pyqt bug, in deleteSlotProxies: if (QThread::currentThread() == up->thread()) delete up; else up->deleteLater(); http://qt-project.org/doc/qt-4.8/qobject.html#dtor.QObject "Warning: Deleting a QObject while pending events