A Qt style sheet is not CSS although it has many similarities. Text in a different colour is trivial and you probably want to tweak the selection highlight colour also:
#include <QtGui>
int main(int argc, char **argv)
{
l.setStyleSheet(
"QLineEdit { "
"color: red; background-color: white; "
"selection-color: white; selection-background-color: red; }" );
l.show();
return app.exec();
}
#include <QtGui>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QLineEdit l;
l.setStyleSheet(
"QLineEdit { "
"color: red; background-color: white; "
"selection-color: white; selection-background-color: red; }" );
l.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
As far as I can see Qt Style Sheets do not have any equivalent of the CSS3 text-shadow property.
Bookmarks