qt - Borders and background of QWidget aren't set by stylesheet -
i've set stylesheet of qwidget
change borders , background,
#gui { border: 4px inset #515c84; border-radius: 9px; background-image: url(./back.png) }
its name gui
neither border nor background shown.
override paintevent
in qwidget
subclass this:
void mywidget::paintevent(qpaintevent *e) { qstyleoption opt; opt.init(this); qstylepainter p(this); p.drawprimitive(qstyle::pe_widget, opt); }
Comments
Post a Comment