QLineEdit默认提示 setPlaceholderText
Setting this property makes the line edit display a grayed-out placeholder text as long as the text() is empty and the widget doesn’t have focus.
方法一
ui->lineEdit->setPlaceholderText("hello furong");
方法二
效果