#[repr(C)]pub struct QItemEditorFactory { /* private fields */ }
Expand description
The QItemEditorFactory class provides widgets for editing item data in views and delegates.
C++ class: QItemEditorFactory
.
The QItemEditorFactory class provides widgets for editing item data in views and delegates.
When editing data in an item view, editors are created and displayed by a delegate. QItemDelegate, which is the delegate by default installed on Qt's item views, uses a QItemEditorFactory to create editors for it. A default unique instance provided by QItemEditorFactory is used by all item delegates. If you set a new default factory with setDefaultFactory(), the new factory will be used by existing and new delegates.
A factory keeps a collection of QItemEditorCreatorBase instances, which are specialized editors that produce editors for one particular QVariant data type (All Qt models store their data in QVariants).
Implementations§
Source§impl QItemEditorFactory
impl QItemEditorFactory
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QItemEditorFactory>>,
) -> Ref<QItemEditorFactory>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QItemEditorFactory>>, ) -> Ref<QItemEditorFactory>
The QItemEditorFactory class provides widgets for editing item data in views and delegates.
Calls C++ function: QItemEditorFactory& QItemEditorFactory::operator=(const QItemEditorFactory& other)
.
The QItemEditorFactory class provides widgets for editing item data in views and delegates.
When editing data in an item view, editors are created and displayed by a delegate. QItemDelegate, which is the delegate by default installed on Qt's item views, uses a QItemEditorFactory to create editors for it. A default unique instance provided by QItemEditorFactory is used by all item delegates. If you set a new default factory with setDefaultFactory(), the new factory will be used by existing and new delegates.
A factory keeps a collection of QItemEditorCreatorBase instances, which are specialized editors that produce editors for one particular QVariant data type (All Qt models store their data in QVariants).
Sourcepub unsafe fn create_editor(
&self,
user_type: c_int,
parent: impl CastInto<Ptr<QWidget>>,
) -> QPtr<QWidget>
pub unsafe fn create_editor( &self, user_type: c_int, parent: impl CastInto<Ptr<QWidget>>, ) -> QPtr<QWidget>
Creates an editor widget with the given parent for the specified userType of data, and returns it as a QWidget.
Calls C++ function: virtual QWidget* QItemEditorFactory::createEditor(int userType, QWidget* parent) const
.
Creates an editor widget with the given parent for the specified userType of data, and returns it as a QWidget.
See also registerEditor().
Sourcepub unsafe fn default_factory() -> Ptr<QItemEditorFactory>
pub unsafe fn default_factory() -> Ptr<QItemEditorFactory>
Returns the default item editor factory.
Calls C++ function: static const QItemEditorFactory* QItemEditorFactory::defaultFactory()
.
Returns the default item editor factory.
See also setDefaultFactory().
Sourcepub unsafe fn new() -> CppBox<QItemEditorFactory>
pub unsafe fn new() -> CppBox<QItemEditorFactory>
Constructs a new item editor factory.
Calls C++ function: [constructor] void QItemEditorFactory::QItemEditorFactory()
.
Constructs a new item editor factory.
Sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QItemEditorFactory>>,
) -> CppBox<QItemEditorFactory>
pub unsafe fn new_copy( other: impl CastInto<Ref<QItemEditorFactory>>, ) -> CppBox<QItemEditorFactory>
The QItemEditorFactory class provides widgets for editing item data in views and delegates.
Calls C++ function: [constructor] void QItemEditorFactory::QItemEditorFactory(const QItemEditorFactory& other)
.
The QItemEditorFactory class provides widgets for editing item data in views and delegates.
When editing data in an item view, editors are created and displayed by a delegate. QItemDelegate, which is the delegate by default installed on Qt's item views, uses a QItemEditorFactory to create editors for it. A default unique instance provided by QItemEditorFactory is used by all item delegates. If you set a new default factory with setDefaultFactory(), the new factory will be used by existing and new delegates.
A factory keeps a collection of QItemEditorCreatorBase instances, which are specialized editors that produce editors for one particular QVariant data type (All Qt models store their data in QVariants).
Sourcepub unsafe fn register_editor(
&self,
user_type: c_int,
creator: impl CastInto<Ptr<QItemEditorCreatorBase>>,
)
pub unsafe fn register_editor( &self, user_type: c_int, creator: impl CastInto<Ptr<QItemEditorCreatorBase>>, )
Registers an item editor creator specified by creator for the given userType of data.
Calls C++ function: void QItemEditorFactory::registerEditor(int userType, QItemEditorCreatorBase* creator)
.
Registers an item editor creator specified by creator for the given userType of data.
Note: The factory takes ownership of the item editor creator and will destroy it if a new creator for the same type is registered later.
See also createEditor().
Sourcepub unsafe fn set_default_factory(
factory: impl CastInto<Ptr<QItemEditorFactory>>,
)
pub unsafe fn set_default_factory( factory: impl CastInto<Ptr<QItemEditorFactory>>, )
Sets the default item editor factory to the given factory. Both new and existing delegates will use the new factory.
Calls C++ function: static void QItemEditorFactory::setDefaultFactory(QItemEditorFactory* factory)
.
Sets the default item editor factory to the given factory. Both new and existing delegates will use the new factory.
See also defaultFactory().
Sourcepub unsafe fn value_property_name(&self, user_type: c_int) -> CppBox<QByteArray>
pub unsafe fn value_property_name(&self, user_type: c_int) -> CppBox<QByteArray>
Returns the property name used to access data for the given userType of data.
Calls C++ function: virtual QByteArray QItemEditorFactory::valuePropertyName(int userType) const
.
Returns the property name used to access data for the given userType of data.