[PyQt] QSpinBox and setLineEdit

Matt Smith melkor at orangepalantir.org
Fri Jan 30 18:10:36 GMT 2009


> Yes, this will do the trick provided that the function you connect to does
> not take to long to update. In that case the spin box jams or locks and does
> several increments of its value. This is exactly why I want to connect to
> the lineedit since this is first updated once the function you connect to
> returns. I post a small cone snippet in a separate post that illustrates
> this.
> 
> Mads

I am going to suggest that if your function is taking too long to update
it is not because of who/what you connected it too, but because your
function is taking too long.  I made the spin box update quickly by
starting a QThread and having the long process execute in that.  

This involved subclassing the spin box so that I would only make a new
thread if the old thread had finished.  

Probably there are more elegant/better solutions.

mbs



More information about the PyQt mailing list