I've set the stylesheet of a QWidget
to change the borders and the background,
#gui {
border: 4px inset #515c84;
border-radius: 9px;
background-image: url(./back.png)
}
Its name is gui
but neither border nor background are shown.
I've set the stylesheet of a QWidget
to change the borders and the background,
#gui {
border: 4px inset #515c84;
border-radius: 9px;
background-image: url(./back.png)
}
Its name is gui
but neither border nor background are shown.
Override paintEvent
in your QWidget
subclass like this:
void MyWidget::paintEvent(QPaintEvent *e)
{
QStyleOption opt;
opt.init(this);
QStylePainter p(this);
p.drawPrimitive(QStyle::PE_Widget, opt);
}
For the Python-QT bindings (PyQt, PySide) just setting the attribute WA_StyledBackground
on the QWidget is enough to show border and background.