'QTextEdit placeholder color
here's my problem: I'm using Qt, I've got two QLineEdits (name, author) and one QTextEdit (description) in my form. I need to set placeholders for each of them, so i wrote this code:
name->setPlaceholderText("Name");
author->setPlaceholderText("Author");
description->setPlaceholderText("Description");
Now I want to style it using QSS, thus i wrote this:
QLineEdit[text=""],
QTextEdit[text=""] {
color: red;
}
But unfortunately this works only for QLineEdits and I cannot find a way to check if QTextEdit is empty in QSS. Do you have any idea? Thanks in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
