Class: QgsCheckableComboBox¶
-
class
qgis.gui.
QgsCheckableComboBox
(parent: QWidget = None)¶ Bases:
PyQt5.QtWidgets.QComboBox
Constructor for QgsCheckableComboBox.
QComboBox subclass which allows selecting multiple items.
New in version 3.0: Enums
Methods
Returns currently checked items.
Returns default text which will be displayed in the widget when no items selected.
Removes selection from all items.
Filters events to enable context menu
Hides the list of items in the combobox if it is currently visible and resets the internal state.
Returns the checked state of the item identified by index
Handler for widget resizing
Selects all items.
Returns separator used to separate items in the display text.
Set items which should be checked/selected.
Set default text which will be displayed in the widget when no items selected.
Sets the item check state to state
Set separator used to separate items in the display text.
Display context menu which allows selecting/deselecting all items at once.
Toggles the item check state
Signals
This signal is emitted whenever the checked items list changed.
Attributes
-
actionEvent
()¶
-
changeEvent
()¶
-
checkedItems
(self) → List[str]¶ Returns currently checked items.
See also
-
checkedItemsChanged
¶ This signal is emitted whenever the checked items list changed. [signal]
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
defaultText
(self) → str¶ Returns default text which will be displayed in the widget when no items selected.
See also
-
deselectAllOptions
(self)¶ Removes selection from all items.
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
eventFilter
(self, object: QObject, event: QEvent) → bool¶ Filters events to enable context menu
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
hidePopup
(self)¶ Hides the list of items in the combobox if it is currently visible and resets the internal state.
-
initPainter
()¶
-
initStyleOption
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
itemCheckState
(self, index: int) → Qt.CheckState¶ Returns the checked state of the item identified by index
- Parameters
index – item index
See also
See also
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
receivers
()¶
-
resizeEvent
(self, event: QResizeEvent)¶ Handler for widget resizing
-
selectAllOptions
(self)¶ Selects all items.
-
sender
()¶
-
senderSignalIndex
()¶
-
separator
(self) → str¶ Returns separator used to separate items in the display text.
See also
-
setCheckedItems
(self, items: Iterable[str])¶ Set items which should be checked/selected.
- Parameters
items – items to select
See also
-
setDefaultText
(self, text: str)¶ Set default text which will be displayed in the widget when no items selected.
- Parameters
text – default text
See also
-
setItemCheckState
(self, index: int, state: Qt.CheckState)¶ Sets the item check state to state
- Parameters
index – item index
state – check state
See also
See also
-
setSeparator
(self, separator: str)¶ Set separator used to separate items in the display text.
- Parameters
separator – separator to use
See also
-
showContextMenu
(self, pos: QPoint)¶ Display context menu which allows selecting/deselecting all items at once.
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
toggleItemCheckState
(self, index: int)¶ Toggles the item check state
- Parameters
index – item index
See also
See also
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-