StarDelegate
Qt Base Class: QStyledItemDelegate
Signature: QStyledItemDelegate(self, parent: Optional[PySide6.QtCore.QObject] = None) -> None
Base classes
Name | Children | Inherits |
---|---|---|
StyledItemDelegate prettyqt.widgets.styleditemdelegate |
⋔ Inheritance diagram
graph TD
1473367022816["itemdelegates.StarDelegate"]
1473296354464["widgets.StyledItemDelegate"]
1473296344704["widgets.AbstractItemDelegateMixin"]
1473299815024["core.ObjectMixin"]
140713234304496["builtins.object"]
1473293727280["QtWidgets.QStyledItemDelegate"]
1473293758512["QtWidgets.QAbstractItemDelegate"]
1473288842240["QtCore.QObject"]
1473291690208["Shiboken.Object"]
1473296354464 --> 1473367022816
1473296344704 --> 1473296354464
1473299815024 --> 1473296344704
140713234304496 --> 1473299815024
1473293727280 --> 1473296354464
1473293758512 --> 1473293727280
1473288842240 --> 1473293758512
1473291690208 --> 1473288842240
140713234304496 --> 1473291690208
🛈 DocStrings
Bases: StyledItemDelegate
A delegate class that allows us to render our star ratings.
Source code in prettyqt\itemdelegates\stardelegate.py
createEditor(parent: widgets.QWidget, option: widgets.QStyleOptionViewItem, index: core.ModelIndex)
Create and return the StarEditor object we'll use to edit the StarRating.
Source code in prettyqt\itemdelegates\stardelegate.py
setEditorData(editor: StarEditor, index: core.ModelIndex)
Set the data to be displayed and edited by our custom editor.
setModelData(editor: widgets.QWidget, model: core.QAbstractItemModel, index: core.ModelIndex)
Get the data from our custom editor and stuffs it into the model.
Source code in prettyqt\itemdelegates\stardelegate.py
sizeHint(option: widgets.QStyleOptionViewItem, index: core.ModelIndex)
Return the size needed to display the item in a QSize object.
⌗ Property table
Qt Property | Type | Doc |
---|---|---|
objectName |
QString |
Delegate ID: star