Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QDragMoveEvent Class Reference

The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress. More...

#include <QDragMoveEvent>

Inherits QDropEvent.

Inherited by QDragEnterEvent.

Public Functions


Detailed Description

The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress.

When a widget accepts drop events, it will receive this event repeatedly while the drag is within the widget's boundaries. The widget should examine the event to see what data it provides, and accept() the drop if appropriate.

Note that this class inherits most of its functionality from QDropEvent.


Member Function Documentation

QDragMoveEvent::QDragMoveEvent ( const QPoint & point, Type type = DragMove )

Creates a QDragMoveEvent of the required type indicating that the mouse is at the point given within a widget.

Warning: Do not create a QDragMoveEvent yourself since these objects rely on Qt's internal state.

void QDragMoveEvent::accept ( const QRect & rectangle )

The same as accept(), but also notifies that future moves will also be acceptable if they remain within the rectangle given on the widget. This can improve performance, but may also be ignored by the underlying system.

If the rectangle is empty, then drag move events will be sent continuously. This is useful if the source is scrolling in a timer event.

void QDragMoveEvent::accept ( bool y = true )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Calls QDropEvent::accept(y)

QRect QDragMoveEvent::answerRect () const

Returns the rectangle for which the acceptance of the move event applies.

void QDragMoveEvent::ignore ( const QRect & rectangle )

The opposite of the accept(const QRect&) function. Moves within the rectangle are not acceptable, and will be ignored.

void QDragMoveEvent::ignore ()

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Calls QDropEvent::ignore().


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp2