PythonQt.QtGui.QComboBox · declarations 003
Back to PythonQt.QtGui.QComboBox
setItemData
setItemData(index: int, value: Any, role: int) -> None
X.setItemData(index, value, role)
Supplemental documentation: Qt 5 reference:
void QComboBox::setItemData(int index, const QVariant \&value, int role \= Qt::UserRole)
Sets the data role for the item on the given index in the combobox to the specified value.
See also itemData().
Upstream PySide2 reference signatures (binding differences may apply):
setItemData(self, index: int, value: typing.Any, role: int=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setItemData
setItemDelegate
setItemDelegate(delegate: Any) -> None
X.setItemDelegate(delegate)
Supplemental documentation: Qt 5 reference:
void QComboBox::setItemDelegate(QAbstractItemDelegate *delegate)
Sets the item delegate for the popup list view. The combobox takes ownership of the delegate.
Warning: You should not share the same instance of a delegate between comboboxes, widget mappers or views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.
See also itemDelegate().
Upstream PySide2 reference signatures (binding differences may apply):
setItemDelegate(self, delegate: PySide2.QtWidgets.QAbstractItemDelegate) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setItemDelegate
setItemIcon
setItemIcon(index: int, icon: Any) -> None
X.setItemIcon(index, icon)
Supplemental documentation: Qt 5 reference:
void QComboBox::setItemIcon(int index, const QIcon \&icon)
Sets the icon for the item on the given index in the combobox.
See also itemIcon().
Upstream PySide2 reference signatures (binding differences may apply):
setItemIcon(self, index: int, icon: PySide2.QtGui.QIcon) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setItemIcon
setItemText
setItemText(index: int, text: str) -> None
X.setItemText(index, text)
Supplemental documentation: Qt 5 reference:
void QComboBox::setItemText(int index, const QString \&text)
Sets the text for the item on the given index in the combobox.
See also itemText().
Upstream PySide2 reference signatures (binding differences may apply):
setItemText(self, index: int, text: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setItemText
setLineEdit
setLineEdit(edit: Any) -> None
X.setLineEdit(edit)
Supplemental documentation: Qt 5 reference:
void QComboBox::setLineEdit(QLineEdit *edit)
Sets the line edit to use instead of the current line edit widget.
The combo box takes ownership of the line edit.
See also lineEdit().
Upstream PySide2 reference signatures (binding differences may apply):
setLineEdit(self, edit: PySide2.QtWidgets.QLineEdit) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setLineEdit
setMaxCount
setMaxCount(max: int) -> None
X.setMaxCount(max)
Upstream PySide2 reference signatures (binding differences may apply):
setMaxCount(self, max: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setMaxCount
setMaxVisibleItems
setMaxVisibleItems(maxItems: int) -> None
X.setMaxVisibleItems(maxItems)
Upstream PySide2 reference signatures (binding differences may apply):
setMaxVisibleItems(self, maxItems: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setMaxVisibleItems
setMinimumContentsLength
setMinimumContentsLength(characters: int) -> None
X.setMinimumContentsLength(characters)
Upstream PySide2 reference signatures (binding differences may apply):
setMinimumContentsLength(self, characters: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setMinimumContentsLength
setModel
setModel(model: Any) -> None
X.setModel(model)
Supplemental documentation: Qt 5 reference:
void QComboBox::setModel(QAbstractItemModel *model)
Sets the model to be model. model must not be nullptr. If you want to clear the
contents of a model, call
clear().
Upstream PySide2 reference signatures (binding differences may apply):
setModel(self, model: PySide2.QtCore.QAbstractItemModel) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setModel
setModelColumn
setModelColumn(visibleColumn: int) -> None
X.setModelColumn(visibleColumn)
Upstream PySide2 reference signatures (binding differences may apply):
setModelColumn(self, visibleColumn: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setModelColumn
setRootModelIndex
setRootModelIndex(index: Any) -> None
X.setRootModelIndex(index)
Supplemental documentation: Qt 5 reference:
void QComboBox::setRootModelIndex(const QModelIndex \&index)
Sets the root model item index for the items in the combobox.
See also rootModelIndex().
Upstream PySide2 reference signatures (binding differences may apply):
setRootModelIndex(self, index: PySide2.QtCore.QModelIndex) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setRootModelIndex
setSizeAdjustPolicy
setSizeAdjustPolicy(policy: Any) -> None
X.setSizeAdjustPolicy(policy)
Upstream PySide2 reference signatures (binding differences may apply):
setSizeAdjustPolicy(self, policy: PySide2.QtWidgets.QComboBox.SizeAdjustPolicy) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setSizeAdjustPolicy
setValidator
setValidator(v: Any) -> None
X.setValidator(v)
Supplemental documentation: Qt 5 reference:
void QComboBox::setValidator(const QValidator *validator)
Sets the validator to use instead of the current validator.
Note: The validator is removed when the
editable property
becomes false.
See also validator().
Upstream PySide2 reference signatures (binding differences may apply):
setValidator(self, v: PySide2.QtGui.QValidator) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setValidator
setView
setView(itemView: Any) -> None
X.setView(itemView)
Supplemental documentation: Qt 5 reference:
void QComboBox::setView(QAbstractItemView *itemView)
Sets the view to be used in the combobox popup to the given itemView. The combobox takes ownership of the view.
Note: If you want to use the convenience views (like QListWidget, QTableWidget or QTreeWidget), make sure to call setModel() on the combobox with the convenience widgets model before calling this function.
See also view().
Upstream PySide2 reference signatures (binding differences may apply):
setView(self, itemView: PySide2.QtWidgets.QAbstractItemView) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#setView
showEvent
showEvent(e: Any) -> None
X.showEvent(e)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QComboBox::showEvent(QShowEvent *e)
Reimplements: QWidget::showEvent(QShowEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
showEvent(self, e: PySide2.QtGui.QShowEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#showEvent
showPopup
showPopup() -> None
X.showPopup()
Supplemental documentation: Qt 5 reference:
[virtual] void QComboBox::showPopup()
Displays the list of items in the combobox. If the list is empty then no items will be shown.
If you reimplement this function to show a custom pop-up, make sure you call hidePopup() to reset the internal state.
See also hidePopup().
Upstream PySide2 reference signatures (binding differences may apply):
showPopup(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#showPopup
sizeAdjustPolicy
instance-attribute
sizeAdjustPolicy: Any
Qt 5 reference:
sizeAdjustPolicy : SizeAdjustPolicy
This property holds the policy describing how the size of the combobox changes when the content changes
The default value is AdjustToContentsOnFirstShow.
Access functions:
| QComboBox::SizeAdjustPolicy | sizeAdjustPolicy() const |
|---|---|
| void | setSizeAdjustPolicy(QComboBox::SizeAdjustPolicy policy) |
See also SizeAdjustPolicy.
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#sizeAdjustPolicy
sizeHint
instance-attribute
sizeHint: QSize
Qt 5 reference:
[override virtual] QSize QComboBox::sizeHint() const
Reimplements an access function for property: QWidget::sizeHint.
This implementation caches the size hint to avoid resizing when the contents change dynamically. To invalidate the cached value change the sizeAdjustPolicy.
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#sizeHint
textActivated
textActivated(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QComboBox.textActivated; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QComboBox::textActivated(const QString \&text)
This signal is sent when the user chooses an item in the combobox. The item's text is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal currentIndexChanged() or currentTextChanged().
This function was introduced in Qt 5.14.
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#textActivated
textHighlighted
textHighlighted(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QComboBox.textHighlighted; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QComboBox::textHighlighted(const QString \&text)
This signal is sent when an item in the combobox popup list is highlighted by the user. The item's text is passed.
This function was introduced in Qt 5.14.
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#textHighlighted
validator
validator() -> Any
X.validator() -> PythonQt.QtGui.QValidator
Supplemental documentation: Qt 5 reference:
const QValidator *QComboBox::validator() const
Returns the validator that is used to constrain text input for the combobox.
See also setValidator() and editable.
Upstream PySide2 reference signatures (binding differences may apply):
validator(self) -> PySide2.QtGui.QValidator
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#validator
view
view() -> Any
X.view() -> PythonQt.QtGui.QAbstractItemView
Supplemental documentation: Qt 5 reference:
QAbstractItemView *QComboBox::view() const
Returns the list view used for the combobox popup.
See also setView().
Upstream PySide2 reference signatures (binding differences may apply):
view(self) -> PySide2.QtWidgets.QAbstractItemView
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#view
wheelEvent
wheelEvent(e: Any) -> None
X.wheelEvent(e)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QComboBox::wheelEvent(QWheelEvent *e)
Reimplements: QWidget::wheelEvent(QWheelEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
wheelEvent(self, e: PySide2.QtGui.QWheelEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qcombobox.html#wheelEvent
windowIconChanged
windowIconChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QComboBox.windowIconChanged; argument details are not documented.
windowIconTextChanged
windowIconTextChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QComboBox.windowIconTextChanged; argument details are not documented.
windowTitleChanged
windowTitleChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QComboBox.windowTitleChanged; argument details are not documented.