treewidgetwithdnd

Extend QTreeWidget to handle drag and drop functionality

class openlp.core.ui.lib.treewidgetwithdnd.TreeWidgetWithDnD(parent=None, name='')[source]

Bases: PyQt5.QtWidgets.QTreeWidget

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

activateDnD()[source]

Activate DnD of widget

addItem(item)[source]
count()[source]
dragEnterEvent(event)[source]

Receive drag enter event, check if it is a file or internal object and allow it if it is.

Parameters:event – The event that occurred
dragMoveEvent(event)[source]

Receive drag move event, check if it is a file or internal object and allow it if it is.

Parameters:event – The event that occurred
dropEvent(event)[source]

Receive drop event, check if it is a file or internal object and process it if it is.

Parameters:event – Handle of the event pint passed
item(index)[source]
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

Parameters:event – The event that occurred