QTfrontend/igbox.cpp
changeset 4560 5d6c7f88db73
parent 3236 4ab3917d7d44
child 4976 088d40d8aba2
equal deleted inserted replaced
4559:194d5a7a3fd4 4560:5d6c7f88db73
    22 #include <QStyleOptionGroupBox>
    22 #include <QStyleOptionGroupBox>
    23 
    23 
    24 #include "igbox.h"
    24 #include "igbox.h"
    25 
    25 
    26 IconedGroupBox::IconedGroupBox(QWidget * parent)
    26 IconedGroupBox::IconedGroupBox(QWidget * parent)
       
    27     : QGroupBox(parent)
    27 {
    28 {
    28 // Has issues with border-radius on children
    29 // Has issues with border-radius on children
    29 //    setAttribute(Qt::WA_PaintOnScreen, true);
    30 //    setAttribute(Qt::WA_PaintOnScreen, true);
    30     titleLeftPadding = 49;
    31     titleLeftPadding = 49;
    31     contentTopPadding = 15;
    32     contentTopPadding = 15;
    54     repaint();
    55     repaint();
    55 }
    56 }
    56 
    57 
    57 void IconedGroupBox::paintEvent(QPaintEvent * event)
    58 void IconedGroupBox::paintEvent(QPaintEvent * event)
    58 {
    59 {
       
    60     Q_UNUSED(event);
       
    61 
    59     QStylePainter painter(this);
    62     QStylePainter painter(this);
    60 
    63 
    61     QStyleOptionGroupBox option;
    64     QStyleOptionGroupBox option;
    62     initStyleOption(&option);
    65     initStyleOption(&option);
    63     painter.drawComplexControl(QStyle::CC_GroupBox, option);
    66     painter.drawComplexControl(QStyle::CC_GroupBox, option);