Skip to content

PythonQt.QtGui.QItemEditorCreatorBase · declarations 001

Back to PythonQt.QtGui.QItemEditorCreatorBase

createWidget

createWidget(parent: Any) -> Any

X.createWidget(parent) -> PythonQt.QtGui.QWidget

Supplemental documentation: Qt 5 reference:

[pure virtual] QWidget *QItemEditorCreatorBase::createWidget(QWidget *parent) const

Returns an editor widget with the given parent.

When implementing this function in subclasses of this class, you must construct and return new editor widgets with the parent widget specified.

Upstream PySide2 reference signatures (binding differences may apply):

createWidget(self, parent: PySide2.QtWidgets.QWidget) -> PySide2.QtWidgets.QWidget

Source: https://doc.qt.io/archives/qt-5.15/qitemeditorcreatorbase.html#createWidget

valuePropertyName

valuePropertyName() -> Any

X.valuePropertyName() -> PythonQt.QtCore.QByteArray

Supplemental documentation: Qt 5 reference:

[pure virtual] QByteArray QItemEditorCreatorBase::valuePropertyName() const

Returns the name of the property used to get and set values in the creator's editor widgets.

When implementing this function in subclasses, you must ensure that the editor widget's property specified by this function can accept the type the creator is registered for. For example, a creator which constructs QCheckBox widgets to edit boolean values would return the checkable property name from this function, and must be registered in the item editor factory for the QVariant::Bool type.

Note: Since Qt 4.2 the item delegates query the user property of widgets, and only call this function if the widget has no user property. You can override this behavior by reimplementing QAbstractItemDelegate::setModelData() and QAbstractItemDelegate::setEditorData().

See also QMetaObject::userProperty() and QItemEditorFactory::registerEditor().

Upstream PySide2 reference signatures (binding differences may apply):

valuePropertyName(self) -> PySide2.QtCore.QByteArray

Source: https://doc.qt.io/archives/qt-5.15/qitemeditorcreatorbase.html#valuePropertyName