1.点开ui 选中LineEdit框 最右侧的属性栏中 echoMode 中选择Password 这样你输入密码时候就不可见了 placeholdertext 中输入对应字符之后 见上图 就可以看见 请输入密码的提示符