Fw: Re: [PyQt] QSpinBox and setLineEdit
Mpi
mpi at comxnet.dk
Fri Jan 30 09:54:24 GMT 2009
--------- Original Besked --------
Fra: Mpi <mpi at comxnet.dk>
Til: Phil Thompson <phil at riverbankcomputing.com>
Emne: Re: [PyQt] QSpinBox and setLineEdit
Dato: 30/01/09 10:49
>
> --------- Original Besked --------
> Fra: Phil Thompson <phil at riverbankcomputing.com>
> Til: Mpi <mpi at comxnet.dk>
> Cc: pyqt at riverbankcomputing.com
> Emne: Re: [PyQt] QSpinBox and setLineEdit
> Dato: 30/01/09 10:42
>
> > On Fri, 30 Jan 2009 10:22:57 +0100, Mpi
&lt;mpi at comxnet.dk&gt; wrote:
> > &gt; Hi,
> > &gt;
> > &gt; You can set a custom line edit on a spinbox using the method
> > setLineEdit().
> > &gt; Suppose I implement a class that inherits from QLineEdit and
> overwirite
> > the
> > &gt; 'setText' method, you'd expect that pressing the arrow
button on the
> > &gt; spinbox
> > &gt; would trigger a call to your custom setText method.
> >
> > No you wouldn't because setLine() isn't virtual.
> >
> > Phil
> >
>
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
spinbox. Any suggestions for a solution?
Mads
More information about the PyQt
mailing list