效果 为了防止中文乱码使用QString::fromLocal8Bit转换为本地默认编码 ui.lineEdit->setPlaceholderText(QString::fromLocal8Bit("提示输入"));