GlueItemWidget

class glue.utils.qt.GlueItemWidget(parent=None)[source]

Bases: object

A mixin for QtWidgets.QListWidget/GlueTreeWidget subclasses, that provides drag+drop functionality.

Attributes Summary

SUPPORTED_MIME_TYPE

data

Methods Summary

drop_data(self, item)

get_data(self, item)

Convenience method to fetch the data associated with a QxxWidgetItem.

mimeData(self, selected_items)

Return a list of MIME data associated with the each selected item.

mimeTypes(self)

Return the list of MIME Types supported for this object.

set_data(self, item, data)

Convenience method to set data associated with a QxxWidgetItem.

Attributes Documentation

SUPPORTED_MIME_TYPE = None
data

Methods Documentation

drop_data(self, item)[source]
get_data(self, item)[source]

Convenience method to fetch the data associated with a QxxWidgetItem.

mimeData(self, selected_items)[source]

Return a list of MIME data associated with the each selected item.

Parameters
selected_itemslist

A list of QtWidgets.QListWidgetItems or QtWidgets.QTreeWidgetItems instances

Returns
resultlist

A list of MIME objects

mimeTypes(self)[source]

Return the list of MIME Types supported for this object.

set_data(self, item, data)[source]

Convenience method to set data associated with a QxxWidgetItem.