QDragEnterEvent Class

QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action enters it. 更多...

头: #include <QDragEnterEvent>
qmake: QT += gui
继承: QDragMoveEvent

公共函数

QDragEnterEvent (const QPoint & point , Qt::DropActions actions , const QMimeData * data , Qt::MouseButtons buttons , Qt::KeyboardModifiers modifiers )

额外继承成员

详细描述

QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action enters it.

A widget must accept this event in order to receive the 拖曳移动事件 that are sent while the drag and drop action is in progress. The drag enter event is always immediately followed by a drag move event.

QDragEnterEvent inherits most of its functionality from QDragMoveEvent , which in turn inherits most of its functionality from QDropEvent .

另请参阅 QDragLeaveEvent , QDragMoveEvent ,和 QDropEvent .

成员函数文档编制

QDragEnterEvent:: QDragEnterEvent (const QPoint & point , Qt::DropActions actions , const QMimeData * data , Qt::MouseButtons buttons , Qt::KeyboardModifiers modifiers )

构造 QDragEnterEvent that represents a drag entering a widget at the given point with mouse and keyboard states specified by buttons and modifiers .

The drag data is passed as MIME-encoded information in data , and the specified actions describe the possible types of drag and drop operation that can be performed.

警告: Do not create a QDragEnterEvent yourself since these objects rely on Qt's internal state.