--------- Original Besked -------- Fra: Matt Smith <[email protected]> Til: [email protected] <[email protected]> Cc: Mads Ipsen <[email protected]> Emne: Re: [PyQt] QSpinBox and setLineEdit Dato: 30/01/09 19:10
> > 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 > 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 [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
