QFrame* separator = new QFrame(); separator->setFrameShape(QFrame::HLine); separator->setStyleSheet("border: 1px solid black;");
QFrame* groupBox = new QFrame(); groupBox->setFrameStyle(QFrame::StyledPanel | QFrame::Raised); groupBox->setStyleSheet("background-color: white; border: 1px solid gray;");This example creates a group box using `QFrame::StyledPanel` frame style with a raised border using `QFrame::Raised` flag. It also sets a white background color and gray 1-pixel solid border using CSS properties. The QFrame class is part of the Qt Core module.