PDA

View Full Version : Separator in box layout



drhex
30th September 2009, 23: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, 23: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.