RQBoxLayout¶
- class pyreaqtive.layouts.rqboxlayout.RQBoxLayout(model, widget, *args, **kwargs)¶
Bases:
PyQt5.QtWidgets.QBoxLayoutReactive QBoxLayout
- Parameters
model (pyreaqtive.models.rqlist.RQList) –
widget (Union[Type[PyQt5.QtWidgets.QWidget], Callable[[Any, pyreaqtive.models.rqlist.RQList], PyQt5.QtWidgets.QWidget]]) –
- __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. The constructor of the widget must take as arguments: object (Object) and list (RQList). Can also be a function that accepts the item and list model as arguments, and returns the widget instance
args – arguments to pass to the native pyqt layout
**kwargs – arguments to pass to the native pyqt layout
- model: pyreaqtive.models.rqlist.RQList¶
Model linked to the layout
- widgets: List[PyQt5.QtWidgets.QWidget]¶
List of current widgets in the layout
- _rq_widget_callback: Callable[[Any, pyreaqtive.models.rqlist.RQList], PyQt5.QtWidgets.QWidget]¶
Widget callback. For a new object that is insert on the list, must return the new and appropriate widget
- _rq_insert_widget(index)¶
Slot triggered when the model inserts a new item
- Parameters
index – index in the initial of the new instance
- Return type
None
- _rq_remove_widget(index)¶
Slot triggered when the model removes an item
- Parameters
index – index in the list of the item removal
- Return type
None