grid(objects,
stretch=False,
margins=None,
hspace=5,
vspace=5)
|
|
Function used to create a L{QtWidgets.QGridLayout} object. The C{objects}
is a list of objects that will populate the grid. The grid's row
count will equal the length of C{objects} and it's column count will
equal the length of the row with the most items. If you want to skip
a column, set it to C{None}, and if you want a column to span multiple
columns add a L{schrodinger.application.bioluminate.layout.ROW_SPAN}
to all the preceding columns you want it to occupy.
Example:
C{objects = [
[ layout.ROW_SPAN, layout.ROW_SPAN, label, None, line_edit],
[ double_spinner, push_button, line_edit ]
]
grid = layout.grid(objects)
}
The above will return a grid layout like:
--------------------------------------------------------------
| label | | line_edit |
-------------------------------------------------------------
| double_spinner | push_button | line_edit | | |
--------------------------------------------------------------
@param objects: Objects (widget, item, or layout) to add to a single
L{QtWidgets.QGridLayout}
@type objects : list of lists
|