Skip to main content

QObject

Struct QObject 

pub struct QObject { /* private fields */ }
Expand description

The QObject class is the base class of all Qt objects.

Most methods available on this type are within the [cxx_qt_lib::QObjectExt] trait, which needs to be imported in order to access these.

Qt Documentation: QObject

Trait Implementations§

§

impl ExternType for QObject

§

type Kind = Opaque

Source§

type Id

A type-level representation of the type’s C++ namespace and type name. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> QObjectExt for T
where T: Upcast<QObject>,

§

fn block_signals(self: Pin<&mut T>, block: bool) -> bool

If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). If block is false, no such blocking will occur. Read more
§

fn signals_blocked(&self) -> bool

Returns true if signals are blocked; otherwise returns false. Read more
§

fn set_object_name(self: Pin<&mut T>, name: &QString)

Sets the object’s name to name.
§

fn object_name(&self) -> QString

Returns the name of this object.
§

fn parent(&self) -> *const QObject

Returns a const pointer to the parent object.
§

fn set_parent<P>(self: Pin<&mut T>, parent: Pin<&mut P>)
where P: Upcast<QObject>,

Makes the object a child of parent.
§

fn unset_parent(self: Pin<&mut T>)

Makes the object parentless.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.