Struct qt_gui::icon_drag_event::IconDragEvent
source · #[repr(C)]pub struct IconDragEvent(_);
Expand description
C++ type: QIconDragEvent
The QIconDragEvent class indicates that a main icon drag has begun.
Icon drag events are sent to widgets when the main icon of a window has been dragged away. On macOS, this happens when the proxy icon of a window is dragged off the title bar.
It is normal to begin using drag and drop in response to this event.
Implementations§
source§impl IconDragEvent
impl IconDragEvent
sourcepub fn new() -> CppBox<IconDragEvent>
pub fn new() -> CppBox<IconDragEvent>
C++ method: [constructor] void QIconDragEvent::QIconDragEvent()
Constructs an icon drag event object with the accept flag set to false.
See also accept().
Methods from Deref<Target = Event>§
sourcepub fn accept(&mut self)
pub fn accept(&mut self)
C++ method: 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 fn ignore(&mut self)
pub fn ignore(&mut self)
C++ method: 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 fn is_accepted(&self) -> bool
pub fn is_accepted(&self) -> bool
C++ method: 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 fn op_assign<'l0, 'l1>(&'l0 mut self, other: &'l1 Event) -> &'l0 mut Event
pub fn op_assign<'l0, 'l1>(&'l0 mut self, other: &'l1 Event) -> &'l0 mut Event
C++ method: QEvent& QEvent::operator=(const QEvent& other)
sourcepub fn set_accepted(&mut self, accepted: bool)
pub fn set_accepted(&mut self, accepted: bool)
C++ method: 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 fn spontaneous(&self) -> bool
pub fn spontaneous(&self) -> bool
C++ method: 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.