Solved How can I set the vertical spacing between widgets / layouts in a main window?
-
The default spacing is too much.
-
@Guerrian Are you talking about http://doc.qt.io/qt-5/qlayout.html#spacing-prop or http://doc.qt.io/qt-5/qspaceritem.html ?
-
@jsulm I'm talking about the main window / central widget. Does it have a built in layout, if so then how do I access it?
ui->?
-
@Guerrian http://doc.qt.io/qt-5/qmainwindow.html#centralWidget gives you central widget and each widget has http://doc.qt.io/qt-5/qwidget.html#layout
ui->centralWidget->layout() -
-
@Guerrian Since you're using designer you can do this there. Select the central widget and go to "Layout" part - you will see many *Margin entries there, change them as needed.