'Allow drag operations to set the new position for current cursor.
:param e: Current mouse event.
:type e: :class:`PyQt4.QtGui.QMouseEvent`'

def mouseMoveEvent(self, e):

    if (e.buttons() & QtCore.Qt.LeftButton):
        try:
            self.move((e.globalPos() - self.dragPos))
        except AttributeError:
            pass
        e.accept()
