34 const auto style = QStyleFactory::create("Fusion"); |
34 const auto style = QStyleFactory::create("Fusion"); |
35 this->setStyle(style); |
35 this->setStyle(style); |
36 this->setStyleSheet(QStringLiteral( |
36 this->setStyleSheet(QStringLiteral( |
37 "*{background-color: %1; color: %2;}" |
37 "*{background-color: %1; color: %2;}" |
38 ).arg(color.name()).arg(foreground.name())); |
38 ).arg(color.name()).arg(foreground.name())); |
39 /* |
|
40 palette.setColor(QPalette::ButtonText, foreground); |
|
41 for (QWidget* widget : {(QWidget*)this->lineEdit, (QWidget*)this->button}) { |
|
42 widget->setPalette(palette); |
|
43 widget->setStyle(style); |
|
44 } |
|
45 */ |
|
46 Q_EMIT this->colorChanged(this->color()); |
39 Q_EMIT this->colorChanged(this->color()); |
47 }); |
40 }); |
48 this->setColor(Qt::black); |
41 this->setColor(Qt::black); |
49 } |
42 } |
50 |
43 |