Reputation: 553
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:
disclaimer: I already searched on the internet but found nothing
Upvotes: 2
Views: 1838
Reputation: 243887
You have to use property placeholderText
:
text_edit.setPlaceholderText("Search")
Upvotes: 6