For my application I created a Window class, I minimized my code as much as possible so that there would be nothing unrelated (css doesn't contain anything about flex-display obvs and no margins/paddings, it's only colors, fonts and button:hover, but removing it doesn't solve the problem). The code is below: class Window(QWidget): def __init__(self, name, width=640, height=480, horizontal_layout=False): super().__init__() self.setWindowTitle(name) self.setGeometry(100, 100, width, height) self.main_layout = QHBoxLayout() if horizontal_layout else QVBoxLayout() self.setLayout(self.main_layout) self.set_css("style.css") self.widget_list = list() def set_css(self, css): style = open(css).read() self.setStyleSheet(style) def add_layout(self): layout = QVBoxLayout() self.main_layout.addLayout(layout) return layout def add_label(self, text, layout=None): label = QLabel(text) self.add_widget(label, layout) return label def add_button(self, text, callback=None, layout=None): layout = layout if layout else self.main_layout button = QPushButton(text) if callback: button.clicked.connect(callback) self.add_widget(button, layout) return button def add_widget(self, widget, layout=None): layout = layout if layout else self.main_layout if not hasattr(layout, 'widgets_list'): layout.widgets_list = list() layout.widgets_list.append(widget) layout.addWidget(widget) app = QApplication([]) main = Window("interface", horizontal_layout=True) col1, col2 = main.add_layout(), main.add_layout() main.add_label("Label 1", layout=col1) main.add_button("Button 1", layout=col1) main.add_label("Label 2", layout=col2) main.add_button("Button 2", layout=col2) main.show() sys.exit(app.exec()) to cut to the chase, I wanted something like on this pic: What I wanted drawn in paint: however, this is the result - the columns do not stack things vertically like I wanted them to, so things just get into a single row in the window: in attempts to fix it, I had some version of the code using the addStretch method to the row layout and wrapping all qvboxlayouts inside qwidgets, it kinda fixed the problem, but all the columns's contents sank to the bottom and absolutely nothing worked to fix it. I would really like some feedback, if there are alternative decisions to this that do not involve qhboxlayout (for example, if you can wrap it and add some css, tho I dont think display flex would work here) or something else - it would be great. I don't know about using the grid layout though because I really want to specifically find the problem in my code. Continue reading...