Hi!
I am trying to achieve a "shadow text" in QLineEdit: ie. a text that is displayed within widget only until a user enters a first character (please see attachment). After that foreground color should change to default/black and "shadow text" should be replaced by contents given by user.
I've created a private slot "editTextChanged(QString)" in my QDialog-derived class that is connected to QLineEdit's textChanged() signal.
I've tried to use isModified() but when I get the notification to editTextChanged() the isModified is already true.
I cannot use setFocus() signal since this is the main widget of the window that gains focus immediately after showing the dialog.
What would be the best way to achieve such functionality?
Using QT4.4
Thank you!
-Marcin
Bookmarks