[Interest] QLineEdit with a validator set

Alex Malyushytskyy alexmalvtk at gmail.com
Thu Jul 18 00:18:29 CEST 2013


Check for intermediate state has to be  done when user initiated action
which needs a valid input at lineEdit.

There is no universal solution. Normally it is but not limited to either
Apply button clicked in the dialog or line edit losing focus.

When you found when this should be done, add code which initiate validation.

Regards,
Alex



On Wed, Jul 17, 2013 at 7:28 AM, Carl Schumann <schumann at fnal.gov> wrote:

> Hi,
>
> I have a text input that I would like to validate.   So I am using a
> QLineEdit instance with a validator.   The user can not type an invalid
> value, which is good.
>
> But users can type an intermediate value and type enter.  When they do
> so I would like to report an error so the user knows the input was not
> accepted.   It is not clear to me how to do this task, since the
> returnPressed signal is not emitted as a result of the input being
> invalid.   Currently I am exploring making my own subclass of QLineEdit.
>
> Thanks for your time.   Any ideas would be appreciated please.
>
> Sincerely,
> Carl Schumann
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130717/7984e9e0/attachment.html>


More information about the Interest mailing list