QLineEdit of six signals
There are three inherited from QWidget, 2 Ge inherited from QObject
Diagram
I've added the top six slots in the name of the function QLineEdit inside, the contents of the slot function is Debug output current signal names
on Figure 1 is not issued debug window signal, there is no thing.
When I filled out the names box to
Can be seen from Figure 2, the four signal sent.
cursorPositionChanged is the current cursor has moved, be signaled
textEdited block is currently being edited, be signaled
textChanged changing the current text block, be signaled
editingFinished editing the current block is completed, to signal
when ENTER is pressed, then the issuing returnPressed signal
The two properties QLineEdit
To name the column, for example, when I was 5 and has not changed placeholderText when clearButtonEnable
gray prompt text box does not exist, when I changed the value placeholderText of the box that is prompted
by checking the box clearButtonEnabled is back in the Clear button
Relating to the issue of the current information is incomplete, not the next step tips
If the current study did not seek to enter the number reached 10, press OK
how to achieve, using QMessagedBox
I used here critical, error reporting
usage is as follows:
if(name.length() < 1 || id.length() < 10 || ins.length() < 1){
QMessageBox::critical(this,"错误","信息填写不完整,请重新检查","确定");
}
When I press OK, and determine which fill in the information is complete, incomplete serial report errors pop up.
Other Question, Information, Warning similar usage.