How do I make a QLineEdit show some predetermined gray text only when it's unfocused and empty? Kind of like the Filter box above the list of widgets in Qt Designer, so you know what I mean.
How do I make a QLineEdit show some predetermined gray text only when it's unfocused and empty? Kind of like the Filter box above the list of widgets in Qt Designer, so you know what I mean.
In Qt 4.7 this is a property of the line edit, in older versions you have to subclass QLineEdit and implement it yourself. You can also use QwwButtonLineEdit and its placeholderText property.
Bookmarks