Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

How to change palette from QSS stylesheet

$
0
0
Hi, I have this code:     QApplication::setStyle(QStyleFactory::create("Fusion"));     QPalette p = qApp->palette();     p.setColor(QPalette::Window, QColor(53,53,53));     p.setColor(QPalette::Button, QColor(53,53,53));     p.setColor(QPalette::Highlight, QColor(175,0,0));     p.setColor(QPalette::ButtonText, QColor(255,255,255));     p.setColor(QPalette::WindowText, QColor(255,255,255));     qApp->setPalette(p); Can I do this same but from QSS? I just want move this harcoded runtime style definition to the QSS so user can modify it. I googled how to read palette by paletterole but how to write? Regards

Viewing all articles
Browse latest Browse all 13965

Latest Images

Trending Articles



Latest Images