Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mads Ipsen
- Original Besked Fra: Matt Smith Til: pyqt@riverbankcomputing.com Cc: Mads Ipsen 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 c

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Matt Smith
> 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 co

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Matt Smith
On Fri, 2009-01-30 at 16:00 +0100, Mads Ipsen wrote: > 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

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mads Ipsen
to returns. I post a small cone snippet in a separate post that illustrates this. Mads - Original Besked Fra: Matt Smith Til: Mads Ipsen Cc: pyqt@riverbankcomputing.com Emne: Re: [PyQt] QSpinBox and setLineEdit Dato: 30/01/09 15:15 > On Fri, 2009-01-30 at 14:55 +0100, Mads Ip

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Matt Smith
On Fri, 2009-01-30 at 14:55 +0100, Mads Ipsen wrote: > import sys > > from PyQt4 import QtCore, QtGui > > def foo(text): > print 'valueChanged():', text > > if __name__ == "__main__": > app = QtGui.QApplication(sys.argv) > spin_box = QtGui.QSpinBox() > line_edit = spin_bo

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mads Ipsen
- Original Besked Fra: Matt Smith Til: pyqt@riverbankcomputing.com Emne: Re: [PyQt] QSpinBox and setLineEdit Dato: 30/01/09 14:11 > > > > > Well, OK. My problem is that I would like to connect up to the > > textChanged(const QString &) signal

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Matt Smith
> > Well, OK. My problem is that I would like to connect up to the > textChanged(const QString &) signal emitted by the spinbox's lineedit. > This > signal, however, is only emitted when the edit is modified directly, not > when it changes indirectly eg. by pressing the up/down arrows on the > sp

Fw: Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mpi
- Original Besked Fra: Mpi Til: Phil Thompson Emne: Re: [PyQt] QSpinBox and setLineEdit Dato: 30/01/09 10:49 > > - Original Besked > Fra: Phil Thompson <p...@riverbankcomputing.com> > Til: Mpi <m...@comxnet.dk> > Cc: pyqt@riverb

Re: [PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Phil Thompson
On Fri, 30 Jan 2009 10:22:57 +0100, Mpi wrote: > Hi, > > You can set a custom line edit on a spinbox using the method setLineEdit(). > Suppose I implement a class that inherits from QLineEdit and overwirite the > 'setText' method, you'd expect that pressing the arrow button on the > spinbox > wou

[PyQt] QSpinBox and setLineEdit

2009-01-30 Thread Mpi
Hi, You can set a custom line edit on a spinbox using the method setLineEdit(). Suppose I implement a class that inherits from QLineEdit and overwirite the 'setText' method, you'd expect that pressing the arrow button on the spinbox would trigger a call to your custom setText method. I can't get t