Re: [PyQt] Profiling with QThreads

2011-10-04 Thread Martin Teichmann
Hi List, [...] I put this operation in a QThread so that the GUI would stay responsive. I am now using a profiler on this application trying to see which calls to the server are taking most of the time. The problem here is that because its on a different thread the profiler doesn't pick up

[PyQt] Fwd: Profiling with QThreads

2011-10-04 Thread Martin Teichmann
Hi List, [...] I put this operation in a QThread so that the GUI would stay responsive. I am now using a profiler on this application trying to see which calls to the server are taking most of the time. The problem here is that because its on a different thread the profiler doesn't pick up

[PyQt] Bug in QFileDialog.getSaveFileName

2011-03-01 Thread Martin Teichmann
Hello Phil, Hello List, Just a little bug report: the following small script raises a TypeError, unexpectedly so. Tested under Windows PyQt4 Version 4.8.3. import sip sip.setapi(QString, 2) # this line important from PyQt4 import QtGui app = QtGui.QApplication([])

[PyQt] Dip and Qt designer

2010-08-03 Thread Martin Teichmann
Hello List, Hello Phil, I just discovered your latest project, dip. I was always looking for such a tool, but didn't like the traits stuff (it always feels a bit fishy), and dip is exactly the thing I need. What I was just wondering about: the nicest current way to make a GUI is through Qt

[PyQt] signals to python-alive, Qt-dead objects

2010-04-23 Thread Martin Teichmann
Hi List, taking the risk of annoying people by asking again, (I didn't get a response last time) I would like to kindly ask if the following behavior is really intended for PyQt4: If a QObject is not used anymore, it gets deleted by Qt, and eventually garbage collected some time later. In the

Re: [PyQt] Again, problems with garbage collection

2010-03-19 Thread Martin Teichmann
Hi List, Hi Phil, I just upgraded to PyQt4 4.7.2 (with Python 2.6.4 on Windows XP) and the following little script crashes with unterlying C/C++ object has been deleted I guess that's a bug. Why? It works as I would expect. Oops. I didn't realize that that's a excpected behaviour. I was

[PyQt] Again, problems with garbage collection

2010-03-18 Thread Martin Teichmann
Hi List, I just upgraded to PyQt4 4.7.2 (with Python 2.6.4 on Windows XP) and the following little script crashes with unterlying C/C++ object has been deleted I guess that's a bug. --- snip -- from PyQt4.QtCore import QObject, SIGNAL,

Re: [PyQt] New PyQt APIs

2010-02-18 Thread Martin Teichmann
Hi Sybren, Hi List, On Monday 15 February 2010 14:06:20 Martin Teichmann wrote: that you can just write: from PyQt4.__future__ import QString I can do simply from PyQt4.QtCore import QString and then use it. Can you give an example of where this fails? That was not my point

[PyQt] New PyQt APIs

2010-02-15 Thread Martin Teichmann
Hi List, I just browsed through the documentation of the new signal system and also for the pythonized APIs for QString and alike. They're great, since this will make programming PyQt4 much more straight forward and especially more pythonic. There are, however, some oddities I think, which I

[PyQt] Garbage collection, signals to partial functions

2009-11-17 Thread Martin Teichmann
Hi List, already recently, I reported a problem with partial functions as slots not being correctly garbage collected. As Phil noted, this was fixed in recent snapshots. But since my code still wouldn't run properly, I investigated a bit more and wrote the following new test case, where still the

Re: [PyQt] Garbage collection, signals to partial functions

2009-11-17 Thread Martin Teichmann
Hi again, list, as per Phil, I changed the code to be executed in an event loop. The problem persists. Greetings Martin new code follows: snip - import gc from PyQt4 import QtCore from weakref import ref from functools import partial

Re: [PyQt] Garbage collection, signals to partial functions

2009-10-29 Thread Martin Teichmann
Hi List, well, apparently I wasn't clear enough. This seems to work for me too. Says Lukas, then showing lu...@laptop ~  $  python gb.py None __main__.A object at 0x7f9baff6ef30 functools.partial object at 0x7f9baa5f3ba8 bound method A.f of __main__.A object at 0x7f9baff6ef30 None

[PyQt] Garbage collection, signals to partial functions

2009-10-28 Thread Martin Teichmann
connected, as documented, but not decreased once object a disappears. I tried it on windows, python 2.5.4 and PyQt4 4.6 and linux, Python 2.6.2, PyQt4 4.4, no difference. The program following this mail illustrates the bug. Greetings Martin Teichmann snip

[PyQt] Garbage collection, signals to partial functions

2009-10-28 Thread Martin Teichmann
connected, as documented, but not decreased once object a disappears. I tried it on windows, python 2.5.4 and PyQt4 4.6 and linux, Python 2.6.2, PyQt4 4.4, no difference. The program following this mail illustrates the bug. Greetings Martin Teichmann snip

[PyQt] QPainter with with statement

2008-03-11 Thread Martin Teichmann
Hi list, I was just wondering if it wasn't a good idea to add the with-statement functionality to the QPainter class. If your program happens to raise an exception while QPainter is active, QPainter.end() might never be called and that leads to a lot of annoying error messages. I just propose