<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html><head><title>QDragMoveEvent Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm } a:link { color: #004faf; text-decoration: none } a:visited { color: #672967; text-decoration: none } td.postheader { font-family: sans-serif } tr.address { font-family: sans-serif } body { background: #ffffff; color: black; } </style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDragMoveEvent Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress. <a href="#details">More...</a></p> <p>Inherits <a href="qdropevent.html">QDropEvent</a>.</p><p>Inherited by <a href="qdragenterevent.html">QDragEnterEvent</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdragmoveevent.html#QDragMoveEvent">__init__</a></b> (<i>self</i>, QPoint <i>pos</i>, Qt.DropActions <i>actions</i>, QMimeData <i>data</i>, Qt.MouseButtons <i>buttons</i>, Qt.KeyboardModifiers <i>modifiers</i>, QEvent.Type <i>type</i> = QEvent.DragMove)</li><li><div class="fn" /><b><a href="qdragmoveevent.html#QDragMoveEvent-2">__init__</a></b> (<i>self</i>, QDragMoveEvent)</li><li><div class="fn" /><b><a href="qdragmoveevent.html#accept">accept</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdragmoveevent.html#accept-2">accept</a></b> (<i>self</i>, QRect <i>r</i>)</li><li><div class="fn" />QRect <b><a href="qdragmoveevent.html#answerRect">answerRect</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdragmoveevent.html#ignore">ignore</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdragmoveevent.html#ignore-2">ignore</a></b> (<i>self</i>, QRect <i>r</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress.</p> <p>A widget will receive drag move events repeatedly while the drag is within its boundaries, if it accepts <a href="qwidget.html#acceptDrops-prop">drop events</a> and <a href="qwidget.html#dragEnterEvent">enter events</a>. The widget should examine the event to see what kind of data it <a class="compat" href="qdropevent-qt3.html#provides">provides</a>, and call the <a href="qdragmoveevent.html#accept">accept</a>() function to accept the drop if appropriate.</p> <p>The rectangle supplied by the <a href="qdragmoveevent.html#answerRect">answerRect</a>() function can be used to restrict drops to certain parts of the widget. For example, we can check whether the rectangle intersects with the geometry of a certain child widget and only call <a href="qdropevent.html#acceptProposedAction">acceptProposedAction()</a> if that is the case.</p> <p>Note that this class inherits most of its functionality from <a href="qdropevent.html">QDropEvent</a>.</p> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDragMoveEvent" />QDragMoveEvent.__init__ (<i>self</i>, <a href="qpoint.html">QPoint</a> <i>pos</i>, <a href="qt-dropactions.html">Qt.DropActions</a> <i>actions</i>, <a href="qmimedata.html">QMimeData</a> <i>data</i>, <a href="qt-mousebuttons.html">Qt.MouseButtons</a> <i>buttons</i>, <a href="qt-keyboardmodifiers.html">Qt.KeyboardModifiers</a> <i>modifiers</i>, <a href="qevent.html#Type-enum">QEvent.Type</a> <i>type</i> = QEvent.DragMove)</h3><p>Creates a <a href="qdragmoveevent.html">QDragMoveEvent</a> of the required <i>type</i> indicating that the mouse is at position <i>pos</i> given within a widget.</p> <p>The mouse and keyboard states are specified by <i>buttons</i> and <i>modifiers</i>, and the <i>actions</i> describe the types of drag and drop operation that are possible. The drag data is passed as MIME-encoded information in <i>data</i>.</p> <p><b>Warning:</b> Do not attempt to create a <a href="qdragmoveevent.html">QDragMoveEvent</a> yourself. These objects rely on Qt's internal state.</p> <h3 class="fn"><a name="QDragMoveEvent-2" />QDragMoveEvent.__init__ (<i>self</i>, <a href="qdragmoveevent.html">QDragMoveEvent</a>)</h3><h3 class="fn"><a name="accept" />QDragMoveEvent.accept (<i>self</i>)</h3><p>The same as accept(), but also notifies that future moves will also be acceptable if they remain within the <i>rectangle</i> given on the widget. This can improve performance, but may also be ignored by the underlying system.</p> <p>If the rectangle is empty, drag move events will be sent continuously. This is useful if the source is scrolling in a timer event.</p> <h3 class="fn"><a name="accept-2" />QDragMoveEvent.accept (<i>self</i>, <a href="qrect.html">QRect</a> <i>r</i>)</h3><h3 class="fn"><a name="answerRect" /><a href="qrect.html">QRect</a> QDragMoveEvent.answerRect (<i>self</i>)</h3><p>Returns the rectangle in the widget where the drop will occur if accepted. You can use this information to restrict drops to certain places on the widget.</p> <h3 class="fn"><a name="ignore" />QDragMoveEvent.ignore (<i>self</i>)</h3><p>The opposite of the accept(const <a href="qrect.html">QRect</a>&) function. Moves within the <i>rectangle</i> are not acceptable, and will be ignored.</p> <h3 class="fn"><a name="ignore-2" />QDragMoveEvent.ignore (<i>self</i>, <a href="qrect.html">QRect</a> <i>r</i>)</h3><p>This is an overloaded function.</p> <p>Calls <a href="qevent.html#ignore">QDropEvent.ignore</a>().</p> <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>