Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.0
-
None
-
Linux Mint 22.1 Cinnamon with dark theme Mint-Y
-
-
Linux/X11
Description
Hi,
On Linux Mint (GTK X11) I'm using dark theme Mint-Y.
Default Qt Project app with fusion style.
In design time I see correct gray color of placeholdertext:
But when I run app it is getting black:
I asked it on Qt forum. Someone suggested to use PhantomStyle instead Fusion. But it had the same problem. Then he suggested to change palette color to something gray alike. When playing with this, I tried something for curiosity:
int main(int argc, char *argv[]) { QApplication a(argc, argv); QPalette pal = QApplication::palette(); pal.setColor(QPalette::PlaceholderText, pal.color(QPalette::PlaceholderText)); QApplication::setPalette(pal); MainWindow w; w.show(); return a.exec(); }
And this fixed the issue:
Seems that QPalette::PlaceholderText color role is not initialized correctly in palette
Attachments
Issue Links
- relates to
-
QTBUG-86195 QLineEdit placeholderText is black instead of grey
-
- Reported
-