用setPlaceholderText()来改变背景文字 ui->lineEdit->setPlaceholderText("青岛"); ui->lineEdit_2->setPlaceholderText("山东地级市");