[−][src]Struct qt_widgets::QItemEditorFactory
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).
Methods
impl QItemEditorFactory
[src]
pub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QItemEditorFactory>>
) -> Ref<QItemEditorFactory>
[src]
&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).
pub unsafe fn create_editor(
&self,
user_type: c_int,
parent: impl CastInto<Ptr<QWidget>>
) -> QPtr<QWidget>
[src]
&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().
pub unsafe fn default_factory() -> Ptr<QItemEditorFactory>
[src]
Returns the default item editor factory.
Calls C++ function: static const QItemEditorFactory* QItemEditorFactory::defaultFactory()
.
Returns the default item editor factory.
See also setDefaultFactory().
pub unsafe fn new() -> CppBox<QItemEditorFactory>
[src]
Constructs a new item editor factory.
Calls C++ function: [constructor] void QItemEditorFactory::QItemEditorFactory()
.
Constructs a new item editor factory.
pub unsafe fn new_copy(
other: impl CastInto<Ref<QItemEditorFactory>>
) -> CppBox<QItemEditorFactory>
[src]
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).
pub unsafe fn register_editor(
&self,
user_type: c_int,
creator: impl CastInto<Ptr<QItemEditorCreatorBase>>
)
[src]
&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().
pub unsafe fn set_default_factory(
factory: impl CastInto<Ptr<QItemEditorFactory>>
)
[src]
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().
pub unsafe fn value_property_name(&self, user_type: c_int) -> CppBox<QByteArray>
[src]
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.
Trait Implementations
impl CppDeletable for QItemEditorFactory
[src]
Auto Trait Implementations
impl RefUnwindSafe for QItemEditorFactory
impl Send for QItemEditorFactory
impl Sync for QItemEditorFactory
impl Unpin for QItemEditorFactory
impl UnwindSafe for QItemEditorFactory
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,