You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Adds a single widget to a layout as a named group with margins specified.
207
+
208
+
Args:
209
+
title: title of the group
210
+
widget: widget to add in the group
211
+
layout: layout to add the group in
212
+
L: left margin (in pixels)
213
+
T: top margin (in pixels)
214
+
R: right margin (in pixels)
215
+
B: bottom margin (in pixels)
216
+
217
+
"""
218
+
group, layout_internal=make_group(title, L, T, R, B)
219
+
layout_internal.addWidget(widget)
220
+
group.setLayout(layout_internal)
221
+
layout.addWidget(group)
222
+
223
+
224
+
defmake_group(title, L=7, T=20, R=7, B=11):
225
+
"""Creates a group widget and layout, with a header (`title`) and content margins for top/left/right/bottom `L, T, R, B` (in pixels)
206
226
Group widget and layout returned will have a Fixed size policy.
207
-
If solo_dict is not None, adds specified widget to specified layout and returns None.
208
227
209
228
Args:
210
229
title (str): Title of the group
211
230
L (int): left margin
212
231
T (int): top margin
213
232
R (int): right margin
214
233
B (int): bottom margin
215
-
solo_dict (dict): shortcut if only one widget is to be added to the group. Should contain "widget" (QWidget) and "layout" (Qlayout), widget will be added to layout. Defaults to None
0 commit comments