Use style sheets or QWidget::setContentsMargins() to reserve some margins for the shadow and override QWidget::paintEvent() to draw it. Don't forget to call the base class implementation to get group box title and frame.