Struct qt_gui::QResizeEvent
source · #[repr(C)]pub struct QResizeEvent { /* private fields */ }
Expand description
The QResizeEvent class contains event parameters for resize events.
C++ class: QResizeEvent
.
The QResizeEvent class contains event parameters for resize events.
Resize events are sent to widgets that have been resized.
The event handler QWidget::resizeEvent() receives resize events.
Implementations§
source§impl QResizeEvent
impl QResizeEvent
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QResizeEvent>>
) -> Ref<QResizeEvent>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QResizeEvent>> ) -> Ref<QResizeEvent>
The QResizeEvent class contains event parameters for resize events.
Calls C++ function: QResizeEvent& QResizeEvent::operator=(const QResizeEvent& other)
.
The QResizeEvent class contains event parameters for resize events.
Resize events are sent to widgets that have been resized.
The event handler QWidget::resizeEvent() receives resize events.
sourcepub unsafe fn new(
size: impl CastInto<Ref<QSize>>,
old_size: impl CastInto<Ref<QSize>>
) -> CppBox<QResizeEvent>
pub unsafe fn new( size: impl CastInto<Ref<QSize>>, old_size: impl CastInto<Ref<QSize>> ) -> CppBox<QResizeEvent>
Constructs a resize event with the new and old widget sizes, size and oldSize respectively.
Calls C++ function: [constructor] void QResizeEvent::QResizeEvent(const QSize& size, const QSize& oldSize)
.
Constructs a resize event with the new and old widget sizes, size and oldSize respectively.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QResizeEvent>>
) -> CppBox<QResizeEvent>
pub unsafe fn new_copy( other: impl CastInto<Ref<QResizeEvent>> ) -> CppBox<QResizeEvent>
The QResizeEvent class contains event parameters for resize events.
Calls C++ function: [constructor] void QResizeEvent::QResizeEvent(const QResizeEvent& other)
.
The QResizeEvent class contains event parameters for resize events.
Resize events are sent to widgets that have been resized.
The event handler QWidget::resizeEvent() receives resize events.
sourcepub unsafe fn old_size(&self) -> Ref<QSize>
pub unsafe fn old_size(&self) -> Ref<QSize>
Returns the old size of the widget.
Calls C++ function: const QSize& QResizeEvent::oldSize() const
.
Returns the old size of the widget.
sourcepub unsafe fn size(&self) -> Ref<QSize>
pub unsafe fn size(&self) -> Ref<QSize>
Returns the new size of the widget. This is the same as QWidget::size().
Calls C++ function: const QSize& QResizeEvent::size() const
.
Returns the new size of the widget. This is the same as QWidget::size().
Methods from Deref<Target = QEvent>§
sourcepub unsafe fn accept(&self)
pub unsafe fn accept(&self)
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
Calls C++ function: void QEvent::accept()
.
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget.
See also ignore().
sourcepub unsafe fn copy_from(&self, other: impl CastInto<Ref<QEvent>>) -> Ref<QEvent>
pub unsafe fn copy_from(&self, other: impl CastInto<Ref<QEvent>>) -> Ref<QEvent>
Calls C++ function: QEvent& QEvent::operator=(const QEvent& other)
.
sourcepub unsafe fn ignore(&self)
pub unsafe fn ignore(&self)
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
Calls C++ function: void QEvent::ignore()
.
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
Clearing the accept parameter indicates that the event receiver does not want the event. Unwanted events might be propagated to the parent widget.
See also accept().
sourcepub unsafe fn is_accepted(&self) -> bool
pub unsafe fn is_accepted(&self) -> bool
the accept flag of the event object
Calls C++ function: bool QEvent::isAccepted() const
.
the accept flag of the event object
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget. By default, isAccepted() is set to true, but don't rely on this as subclasses may choose to clear it in their constructor.
For convenience, the accept flag can also be set with accept(), and cleared with ignore().
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
sourcepub unsafe fn set_accepted(&self, accepted: bool)
pub unsafe fn set_accepted(&self, accepted: bool)
the accept flag of the event object
Calls C++ function: void QEvent::setAccepted(bool accepted)
.
the accept flag of the event object
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget. By default, isAccepted() is set to true, but don't rely on this as subclasses may choose to clear it in their constructor.
For convenience, the accept flag can also be set with accept(), and cleared with ignore().
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
sourcepub unsafe fn spontaneous(&self) -> bool
pub unsafe fn spontaneous(&self) -> bool
Returns true
if the event originated outside the application (a system event); otherwise returns false
.
Calls C++ function: bool QEvent::spontaneous() const
.
Returns true
if the event originated outside the application (a system event); otherwise returns false
.
The return value of this function is not defined for paint events.
Trait Implementations§
source§impl CppDeletable for QResizeEvent
impl CppDeletable for QResizeEvent
source§impl Deref for QResizeEvent
impl Deref for QResizeEvent
source§impl DynamicCast<QResizeEvent> for QEvent
impl DynamicCast<QResizeEvent> for QEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QResizeEvent>
unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QResizeEvent>
Calls C++ function: QResizeEvent* dynamic_cast<QResizeEvent*>(QEvent* ptr)
.
source§impl Size for QResizeEvent
impl Size for QResizeEvent
source§unsafe fn size(&self) -> usize
unsafe fn size(&self) -> usize
Returns the new size of the widget. This is the same as QWidget::size().
Calls C++ function: const QSize& QResizeEvent::size() const
.
Returns the new size of the widget. This is the same as QWidget::size().
source§impl StaticDowncast<QResizeEvent> for QEvent
impl StaticDowncast<QResizeEvent> for QEvent
source§unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QResizeEvent>
unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QResizeEvent>
Calls C++ function: QResizeEvent* static_cast<QResizeEvent*>(QEvent* ptr)
.
source§impl StaticUpcast<QEvent> for QResizeEvent
impl StaticUpcast<QEvent> for QResizeEvent
source§unsafe fn static_upcast(ptr: Ptr<QResizeEvent>) -> Ptr<QEvent>
unsafe fn static_upcast(ptr: Ptr<QResizeEvent>) -> Ptr<QEvent>
Calls C++ function: QEvent* static_cast<QEvent*>(QResizeEvent* ptr)
.