StarDelegate
Base classes
| Name | Children | Inherits |
|---|---|---|
| StyledItemDelegate prettyqt.widgets.styleditemdelegate |
|
⋔ Inheritance diagram
graph TD
1055912865["itemdelegates.StarDelegate"]
4109708588["widgets.StyledItemDelegate"]
3153451512["widgets.AbstractItemDelegateMixin"]
3227531497["core.ObjectMixin"]
2751680898["builtins.object"]
3599391368["QtWidgets.QStyledItemDelegate"]
475576970["QtWidgets.QAbstractItemDelegate"]
3984060476["QtCore.QObject"]
37984305["Shiboken.Object"]
4109708588 --> 1055912865
3153451512 --> 4109708588
3227531497 --> 3153451512
2751680898 --> 3227531497
2751680898 --> 3153451512
3599391368 --> 4109708588
475576970 --> 3599391368
3984060476 --> 475576970
37984305 --> 3984060476
2751680898 --> 37984305
🛈 DocStrings
Bases: StyledItemDelegate
A delegate class that allows us to render our star ratings.
Source code in prettyqt/itemdelegates/stardelegate.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
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.