Home > Mobile >  Questions about the some limitations of QLineEdit input.
Questions about the some limitations of QLineEdit input.

Time:09-21

Like I want to input range is 60.0 to 6.0, with a decimal,
Edit box - & gt; SetValidator (new QDoubleValidator (60.0, 6.0, 1, this));

But if the edit box to remove all data into an empty, and then leave the cursor edit box, using QLineEdit: : editingFinished won't response, why I know ,
My question is this case how to judge??????? Because I want to set the edit box shows 0, but unable to get the signal, how to solve???
Must be a cursor left the edit box the edit box is empty inside signal

CodePudding user response:

And displaying symbols - in edit box, this time the cursor left the edit box, how to obtain the signal

CodePudding user response:

Can override QLineEdit focusOutEvent events, according to the text in the event () signal from the corresponding content

CodePudding user response:

refer to the second floor of Yi reply:
can override QLineEdit focusOutEvent events, according to the text in the event () the content of the signal of the corresponding

Good thank you
  •  Tags:  
  • Qt
  • Related