Hi all.
Here is what I want to do:
1) In paintEvent a make some draws and text in the widget using a QPainter object
2) Then a want to give it a perfurated effect. I'm thinking in this solution
QBrush brush
(this
->palette
().
background().
color(),Qt
::Dense4Pattern);
painter.fillRect(0, 0, this->width() - 1, this->height() - 1, brush);
QBrush brush(this->palette().background().color(),Qt::Dense4Pattern);
painter.fillRect(0, 0, this->width() - 1, this->height() - 1, brush);
To copy to clipboard, switch view to plain text mode
The problem is the that palette().background().color() doesn't return the right widget backgroung color. It returns an aproximate light color.
Am I missing something?
Bookmarks