QTfrontend/igbox.cpp
changeset 1193 2911384169b4
parent 1192 63b7961f68de
child 1209 7f6cb1d7be2a
--- a/QTfrontend/igbox.cpp	Tue Aug 12 08:48:44 2008 +0000
+++ b/QTfrontend/igbox.cpp	Tue Aug 12 09:26:44 2008 +0000
@@ -18,6 +18,9 @@
 
 #include <QPainter>
 #include <QPoint>
+#include <QStylePainter>
+#include <QStyleOptionGroupBox>
+
 #include "igbox.h"
 
 IconedGroupBox::IconedGroupBox(QWidget * parent)
@@ -32,7 +35,11 @@
 
 void IconedGroupBox::paintEvent(QPaintEvent * event)
 {
-	QPainter painter(this);
+	QStylePainter painter(this);
 
-	icon.paint(&painter, QRect(QPoint(0, 0), size()));
+	QStyleOptionGroupBox option;
+	initStyleOption(&option);
+	painter.drawComplexControl(QStyle::CC_GroupBox, option);
+
+	icon.paint(&painter, QRect(QPoint(0, 0), icon.actualSize(size())));
 }