asdf

C++ code posted
created at 10 Aug 12:13

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
void Utilities::setFormErrorStyle(QLineEdit *lineEdit)
{
    lineEdit->setStyleSheet(
            "background-color: #FF8A8A;"
            "background-image: url(:/resources/warning.png);"
            "background-position: right center;"
            "background-repeat: no-repeat;"
            "");

    QPalette palette;

    QBrush brush(QColor(255, 138, 138));
    brush.setStyle(Qt::SolidPattern);
    palette.setBrush(QPalette::Active, QPalette::Base, brush);
    palette.setBrush(QPalette::Inactive, QPalette::Base, brush);

    lineEdit->setPalette(palette);
    lineEdit->setAutoFillBackground(true);
}
628 Bytes in 2 ms with coderay