void WControl::hasColors(SettingsList *settings){ QPalette p = palette(); p.setColor( QPalette::Text, makeSetting(settings,"foreground",QColor(Qt::black), QVariant::Color, tr(".Цвет текста")).value<QColor>() ); p.setColor( QPalette::Base, makeSetting(settings,"background",QColor(Qt::white), QVariant::Color, tr(".Цвет фона")).value<QColor>() ); setPalette(p);}
QColor c = makeSetting(...);setStyleSheet(QString("QLineEdit { background: rgb(%1, %2, %3); }").arg(c.red()).arg(c.green()).arg(c.blue()));