Qt Toolkit - QDragMoveEvent Class

| Classes - Annotated - Tree - Functions - Home - Structure

# QDragMoveEvent Class Reference

Event sent as a drag-and-drop is in progress. More...

`#include <qevent.h>`

Inherits QDropEvent.

Inherited by QDragEnterEvent.

List of all member functions.

## Public Members

- QDragMoveEvent ( const QPoint & pos, Type typ=DragMove )
- QRect answerRect () const
- void accept ( const QRect & r )
- void ignore ( const QRect & r )

## Detailed Description

Event sent as a drag-and-drop is in progress.

When a widget accepts drop events, it will receive this event repeatedly while the the drag is inside that widget. The widget should examine the event, especially seeing what data it provides, and accept() the drop if appropriate.

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

Examples: desktop/desktop.cpp

## Member Function Documentation

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

Creates a QDragMoveEvent for which the mouse is at point pos, and the given event type.

Note that internal state is also involved with QDragMoveEvent, so it is not useful to create these yourself.

### void QDragMoveEvent::accept ( bool y=TRUE )

Reimplemented for internal reasons; the API is not affected.

### void QDragMoveEvent::accept ( const QRect & r )

The same as accept(), but also notifies that future moves will also be acceptable if they remain within the rectangle r 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.

### QRect QDragMoveEvent::answerRect () const

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

### void QDragMoveEvent::ignore ()

Reimplemented for internal reasons; the API is not affected.

### void QDragMoveEvent::ignore ( const QRect & r )

The opposite of accept(const QRect&).

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):

This file is part of the Qt toolkit, copyright © 1995-2001 Trolltech, all rights reserved.