How to programmatically change the color of the QFrame?

Hello. You must progress to paint the frames and change their color. Doing it this way:
ffd.frame = new QFrame(ui->VideoLabel);

 QPalette palette;
 QBrush brush(QColor(0, 255, 0, 255));
brush.setStyle(Qt::SolidPattern);
 palette.setBrush(QPalette::All, QPalette::Window, brush);
ffd.frame->setPalette(palette);
ffd.frame->setGeometry(x,y,width,height);
ffd.frame->setFrameShape(QFrame::Box);
ffd.frame->setFrameShadow(QFrame::Plain);
ffd.frame->setAutoFillBackground(false);
ffd.frame->setLineWidth(2);
 ffd.frame->show();

Frame is displayed, but its color does not change. Tell me what I'm doing does or how to fix it. Thank you.
July 2nd 19 at 14:19
1 answer
July 2nd 19 at 14:21
Solution
For any widget, there is setStyle(), which eats a string with css style.
a possible example? - Opal16 commented on July 2nd 19 at 14:24

Find more questions by tags Qt