RQCombobox¶
- class pyreaqtive.widgets.rqcombobox.RQComboBox(model, *args, rq_if=None, rq_disabled=None, **kwargs)¶
Bases:
pyreaqtive.widgets.rqwidget.RQWidget,PyQt5.QtWidgets.QComboBoxReactive ComboBox Widget.
- Parameters
model (pyreaqtive.models.rqchoice.RQChoice) –
args (Any) –
rq_if (Optional[pyreaqtive.models.rqbool.RQBool]) –
rq_disabled (Optional[pyreaqtive.models.rqbool.RQBool]) –
kwargs (Any) –
- Return type
None
- __init__(model, *args, rq_if=None, rq_disabled=None, **kwargs)¶
Constructor.
- Parameters
model (pyreaqtive.models.rqchoice.RQChoice) – Model to link the widget to
*args – arguments to pass to the native pyqt widget
rq_if (Optional[pyreaqtive.models.rqbool.RQBool]) – RQBool that controls the visibility
rq_disabled (Optional[pyreaqtive.models.rqbool.RQBool]) – RQBool that controls the disabling
**kwargs – arguments to pass to the native pyqt widget
args (Any) –
kwargs (Any) –
- Return type
None
- _rq_choice_insert(index)¶
Slot triggered when the initial of choices inserts a new item.
Adds the option to the combobox
- Parameters
index (int) – element of the initial
- Return type
None
- _rq_choice_remove(index)¶
Slot triggered when the initial of choices removes a new item.
Removes the option from the combobox
- Parameters
index (int) – element of the initial
- Return type
None
- _rq_data_changed()¶
Slot triggered when the selection of the choice model changed.
Updates the combobox selection
- Return type
None
- _rq_writing = False¶
Flag to signal that this widget is triggering the update and is writing to the model
- _rq_reading = False¶
Flag to indicate that the model changed and the widget is reading the model
- _current_index_changed(index)¶
Slot triggered when the user changes the selection in the combobox.
- Parameters
index (int) – selected item index
- Return type
None