listwidgetwithdnd

Extend QListWidget to handle drag and drop functionality

class openlp.core.ui.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

clear(search_while_typing=False, override_lock=False)[source]

Re-implement clear, so that we can customise feedback when using ‘Search as you type’

Parameters:search_while_typing – True if we want to display the customised message
Returns:None
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

paintEvent(event)[source]

Re-implement paintEvent so that we can add ‘No Results’ text when the listWidget is empty.

Parameters:event – A QPaintEvent
Returns:None