listwidgetwithdnd

Extend QListWidget to handle drag and drop functionality

class openlp.core.lib.listwidgetwithdnd.ListWidgetWithDnD(parent=None, name='')[source]

Bases: PyQt5.QtWidgets.QListWidget

Provide a list widget to store objects and handle drag and drop events

activateDnD()[source]

Activate DnD of widget

dragEnterEvent(event)[source]

When something is dragged into this object, check if you should be able to drop it in here.

dragMoveEvent(event)[source]

Make an object droppable, and set it to copy the contents of the object, not move it.

dropEvent(event)[source]

Receive drop event check if it is a file and process it if it is.

Parameters:event – Handle of the event pint passed
mouseMoveEvent(event)[source]

Drag and drop event does not care what data is selected as the recipient will use events to request the data move just tell it what plugin to call