| 12 | namespace validators { |
| 13 | |
| 14 | ValidationError::ValidationError(QObject *parent, QLabel *label) : QObject(parent), m_label(label) |
| 15 | { |
| 16 | if (!m_label) |
| 17 | return; |
| 18 | |
| 19 | m_label->clear(); |
| 20 | m_label->setContentsMargins(5, 3, 5, 3); |
| 21 | |
| 22 | auto palette = m_label->palette(); |
| 23 | palette.setColor(QPalette::WindowText, Qt::white); |
| 24 | palette.setColor(QPalette::Window, QStringLiteral("crimson")); |
| 25 | m_label->setPalette(palette); |
| 26 | } |
| 27 | |
| 28 | const QString &ValidationError::message() const |
| 29 | { |