hello,
i have a simple class that derives from QWidget.
the paint event looks like this:
{
opt.init(this);
style
()->drawPrimitive
(QStyle::PE_Widget,
&opt,
&p,
this);
}
void ssbgtest::paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
To copy to clipboard, switch view to plain text mode
well, this paintevent lets me use background-image in the style sheet.
but i need a border-image, because it will then resize the image when you resize the window. background-image tiles the image.
what i need is the code to provide this feature for my simple class. i guess its only about the primitiv element, but which is the right to draw?
greetz qt fan
Bookmarks