rqt_py_common.layout_util module
- class rqt_py_common.layout_util.LayoutUtil
Bases:
object
- static alternate_color(list_widgets, colors_alter=[python_qt_binding.QtCore.Qt.white, python_qt_binding.QtCore.Qt.gray])
Alternate the background color of the widgets.
Widgets are ordered linearly, by the given list of colors.
Originally intended for the elements of QHBoxLayout & QVBoxLayout.
@type list_widgets: QtGui.QWidget[] @type colors_alter: QtCore.Qt.GlobalColor[] @param colors_alter: 1st element is used as initial/default color. @rtype: void
@author: Isaac Saito
- static clear_layout(layout)
Clear all items in the given layout.
Currently, only the instances of QWidgetItem get cleared (ie. QSpaceItem is ignored).
Originally taken from http://stackoverflow.com/a/9375273/577001