[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QSpinBox and setLineEdit
From:       Mads Ipsen <mpi () comxnet ! dk>
Date:       2009-01-30 18:53:14
Message-ID: 23886977714ed2add2d93c7cd359bd51 () ws001a ! cxnet ! dk
[Download RAW message or body]

--------- Original Besked --------
Fra: Matt Smith <melkor@orangepalantir.org>
Til: pyqt@riverbankcomputing.com <pyqt@riverbankcomputing.com>
Cc: Mads Ipsen <mpi@comxnet.dk>
Emne: Re: [PyQt] QSpinBox and setLineEdit
Dato: 30/01/09 19:10

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

Funny thing is: The problem is not present on Mac and in Qt3 you could do
trick of using the lineEdit() method (called editor() in Qt3) to handle when
the spin box was done.

Could you provide me with a few snippets/starters for doing this in a
threaded way?

Best regards,

Mads
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic