
Untitled
By: a guest on
Jun 9th, 2012 | syntax:
None | size: 0.52 KB | hits: 23 | expires: Never
Qt Stylesheet mystery
this->ApplyStyleSheet(":/qss/default.qss");
QWidget#myWidget {
background: transparent;
background-image: url(:/images/bg_img.png);
background-repeat: repeat-x;
}
QMyDerivedClass#myWidget {
background: transparent;
background-image: url(:/images/bg_img.png);
background-repeat: repeat-x;
}
void CustomWidget::paintEvent (QPaintEvent *)
{
QStyleOption opt;
opt.init (this);
QPainter p (this);
style ()->drawPrimitive (QStyle::PE_Widget, &opt, &p, this);
}