Either write a sub-class of QFrame and implment paint() or just reuse QGroupBox and set layout margin as required