irrad_control/gui/widgets/util_widgets.py
def add_item(self, item):
        """Adds *widget* to container where *widget* can be any QWidget or an iterable of QWidgets."""

        error = False
        def check(x): return isinstance(x, QtWidgets.QWidget) or isinstance(x, QtWidgets.QLayout)

        if isinstance(item, Iterable):
            if not all(check(x) for x in item):
                error = True

        elif not check(item):
            # Only single widget is added to the current row
            error = True

        if error:
            raise TypeError("Only QWidgets and QLayouts can be added to layout!")
        else:
            self._add_item(item)
Adds *widget* to container where *widget* can be any QWidget or an iterable of QWidgets.
Adds *widget* to container where *widget* can be any QWidget or an iterable of QWidgets.
Adds * widget * to container where * widget * can be any QWidget or an iterable of QWidgets .
def add_item(self, item):
        error = False
        def check(x): return isinstance(x, QtWidgets.QWidget) or isinstance(x, QtWidgets.QLayout)
        if isinstance(item, Iterable):
            if not all(check(x) for x in item):
                error = True
        elif not check(item):
            error = True
        if error:
            raise TypeError("Only QWidgets and QLayouts can be added to layout!")
        else:
            self._add_item(item)
def add_item ( self , item ) : error = False def check ( x ) : return isinstance ( x , QtWidgets . QWidget ) or isinstance ( x , QtWidgets . QLayout ) if isinstance ( item , Iterable ) : if not all ( check ( x ) for x in item ) : error = True elif not check ( item ) : error = True if error : raise TypeError ( "Only QWidgets and QLayouts can be added to layout!" ) else : self . _add_item ( item )
Adds *widget* to container where *widget* can be any QWidget or an iterable of QWidgets.
Adds * widget * to container where * widget * can be any QWidget or an iterable of QWidgets .
"""Adds *widget* to container where *widget* can be any QWidget or an iterable of QWidgets.""" # Only single widget is added to the current row
self
item