PDA

View Full Version : Separator in box layout



drhex
30th September 2009, 22:30
Is there an easy way to get a thin line between two widgets in a box layout?
(such as the one between the menu bar and the central widget in a QMainWindow)

ntp
30th September 2009, 22:36
Why not use a QFrame in the shape of a line?



QFrame* line = new QFrame();
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
boxLayout->addWidget(line);


You can put that into the layout.