Qt - QLineEdit edit box

QLineEdit input content acquisition and plausibility check?

Control comes with trigger information:

 

void textChanged(const QString &);

void textEdited(const QString &);
Difference between the two: 
  1. the textChanged (): generating a signal when the text content changes.
  2.textEdited (): generating a signal when editing text content.
Details logical distinction:
 the textChanged Signal: whenever the text changes, will send this signal. Text argument is the new text. And textEdited () different, when you change the text programmatically, for example, by calling setText () will also send this signal.
textEdited signal: whenever the text is edited, it will send the signal. Text argument is the new text. And the textChanged () different, when programmatically change the text, for example, this signal is not sent by calling the setText ()

 



  

Guess you like

Origin www.cnblogs.com/Dana-gx/p/11089181.html