I've got a widget placed within a QHBoxLayout, as well as a QGroupBox above it which has the same widgets within that. I want the widgets to align vertically whether they're in a group box or outside of one, so I want to add a left margin (CSS talk) to the widgets outside of a group box, but I'm not sure how to do it.
I've basically got this:
I've basically got this:
tab_content_layout = QVBoxLayout() tab_content_layout.setAlignment(Qt.AlignmentFlag.AlignTop) tab_content_layout.setSpacing(5) group_1 = QGroupBox('T1 - Source Conversion') ... tab_content_layout.addWidget(group_1) fn = IgnitionFunctionButton('T2', 'Report UDT Instance Property Overrides', '', '') ## need to add left margin / move fn to the right 10px tab_content_layout.addWidget(fn)Note:
IgnitionFunctionButton
is a custom widget that shows a label, button, and two icons (SVGs).