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");

方法二
1
效果
1

posted @ 2018-08-31 16:05  thomas_blog  阅读(2020)  评论(0编辑  收藏  举报