RQHBoxLayout

class pyreaqtive.layouts.rqhboxlayout.RQHBoxLayout(model, widget, *args, **kwargs)

Bases: pyreaqtive.layouts.rqboxlayout.RQBoxLayout

Reactive QHBoxLayout.

Parameters
Return type

None

model: RQList

Model linked to the layout

widgets: List[QWidget]

List of current widgets in the layout

_rq_widget_callback: Callable[[Any, RQList], QWidget]

Widget callback. For a new object that is insert on the list, must return the new and appropriate widget

__init__(model, widget, *args, **kwargs)

Constructor.

Parameters
  • model (pyreaqtive.models.rqlist.RQList) – RQList representing all the items in the layout

  • widget (Union[Type[PyQt5.QtWidgets.QWidget], Callable[[Any, pyreaqtive.models.rqlist.RQList], PyQt5.QtWidgets.QWidget]]) – QWidget type that represents each item. Can also be a function that accepts the item and list model as arguments, and returns the widget instance

  • args (Any) – arguments to pass to the native pyqt layout

  • **kwargs – arguments to pass to the native pyqt layout

  • kwargs (Any) –

Return type

None