Qt 6.3: stylesheets with QLineEdit makes the placeholder color same as text
-
Hello,
I am migrating my app from Qt 5.15.2 to Qt 6.3.0.
If this seems to be working pretty good so far, I just noticed that using stylesheets makes my QLineEdits' placeholder color the same as the text color, which is very frustrating, because you cannot see which QLineEdit is empty or filled.- Qt 5.15.2 with default OS theme :
- Qt 5.15.2 with stylesheet :
- Qt 6.3.0 with default OS theme :
- Qt 6.3.0 with stylesheet :
Do you have any clue of what could have been modified in Qt 6 when it comes to stylesheets?
Also, I've tried tried using the stylesheet code from https://forum.qt.io/topic/90176/change-qlineedit-placeholder-text-color/8 but it changes both the text color and the placeholder color. - Qt 5.15.2 with default OS theme :
-
For those of you who would find this post and are looking for a solution, I used this workaround, on Qt 6.3.1 :
https://bugreports.qt.io/browse/QTBUG-95297 -
Hi,
That looks like a possible bug.
Can you provide a minimal compilable example that shows this behaviour ?
-
Hi,
That looks like a possible bug.
Can you provide a minimal compilable example that shows this behaviour ?
-
Hi,
That looks like a possible bug.
Can you provide a minimal compilable example that shows this behaviour ?
@SGaist said in Qt 6.3: stylesheets with QLineEdit makes the placeholder color same as text:
Hi,
That looks like a possible bug.
Can you provide a minimal compilable example that shows this behaviour ?
Hello again. Sorry for the double post, but have you had time to check my example project yet?
-
Not yet, will do ASAP
-
I can confirm the behaviour change between Qt 5 and Qt 6 on Linux.
You should check the bug report system to see if it's something known. If not, please consider opening a new report providing your example.
-
I can confirm the behaviour change between Qt 5 and Qt 6 on Linux.
You should check the bug report system to see if it's something known. If not, please consider opening a new report providing your example.
@SGaist Hello,
Thanks for the confirmation!I just checked on the bug report system, and it seems that is is a known bug since the early development of Qt 6 :/
There are already 4 or 5 tickets talking about this issue or related things (QSS / QPalette).
All the tickets are in low priority, I'm a little bit sad about that, but I guess I will just have to wait more to use Qt 6, and stick with 5.15.2 for a while ^^ -
Can you link what you found ?
Is there any of these that related to your issue ? -
Hello,
I've managed to find the tickets through this request:
https://bugreports.qt.io/browse/QTBUG-92199?jql=text ~ "placeholder stylesheet" -
Thanks !
-
For those of you who would find this post and are looking for a solution, I used this workaround, on Qt 6.3.1 :
https://bugreports.qt.io/browse/QTBUG-95297