QTextEdit default value

Viewed 599

i am using pyqt5 and i am wondering how i can set a default text to a textedit widget? So that it shows for example "Type your name here" and when i type something the text goes away. Like on login pages. I am happy about every answer!

it should look like this:

here

disclaimer: I already searched on the internet but found nothing

1 Answers

You have to use property placeholderText :

text_edit.setPlaceholderText("Search")
Related