Qt 6.11 is out! See what's new in the release
blog
QLineEdit and changing font for the "PlaceHolder" text
General and Desktop
4
Posts
3
Posters
9.6k
Views
1
Watching
-
Is there a stylesheet tag I can use to change the font/font size of the placeholder text (and just that, leave the normal edit text as is) in QLineEdit?
-
Form what I've seen, there is only one font property, which applies to the regular text as well as to the place holder text.
To work around you can attach signal textChanged() to a slot, check if the QString is empty or not and set the font property accordingly. I don't know if that would cause some flicker, though.
Anyways, you might add an improvement issue to the "bug tracker":http://bugreports.qt.nokia.com
-
well, Volker is a mad scientist ;-)
Thank you both.