当lineEdit 里面的字符过多的时候,会导致只能显示后面的字符,而前面的字符不会显示; 只需要将光标设置在左端,即可。 ui->lineEdit->setCursorPosition(0);//设置光标在左侧