equal
deleted
inserted
replaced
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
17 */ |
17 */ |
18 |
18 |
19 #include <QPainter> |
19 #include <QPainter> |
20 #include <QPoint> |
20 #include <QPoint> |
|
21 #include <QStylePainter> |
|
22 #include <QStyleOptionGroupBox> |
|
23 |
21 #include "igbox.h" |
24 #include "igbox.h" |
22 |
25 |
23 IconedGroupBox::IconedGroupBox(QWidget * parent) |
26 IconedGroupBox::IconedGroupBox(QWidget * parent) |
24 { |
27 { |
25 |
28 |
30 this->icon = icon; |
33 this->icon = icon; |
31 } |
34 } |
32 |
35 |
33 void IconedGroupBox::paintEvent(QPaintEvent * event) |
36 void IconedGroupBox::paintEvent(QPaintEvent * event) |
34 { |
37 { |
35 QPainter painter(this); |
38 QStylePainter painter(this); |
36 |
39 |
37 icon.paint(&painter, QRect(QPoint(0, 0), size())); |
40 QStyleOptionGroupBox option; |
|
41 initStyleOption(&option); |
|
42 painter.drawComplexControl(QStyle::CC_GroupBox, option); |
|
43 |
|
44 icon.paint(&painter, QRect(QPoint(0, 0), icon.actualSize(size()))); |
38 } |
45 } |