GlueItemWidget#

class glue_qt.utils.GlueItemWidget(parent=None)#

Bases: object

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

Attributes Summary

SUPPORTED_MIME_TYPE

data

Methods Summary

drop_data(item)

get_data(item)

Convenience method to fetch the data associated with a QxxWidgetItem.

mimeData(selected_items)

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

mimeTypes()

Return the list of MIME Types supported for this object.

set_data(item, data)

Convenience method to set data associated with a QxxWidgetItem.

Attributes Documentation

SUPPORTED_MIME_TYPE = None#
data#

Methods Documentation

drop_data(item)#
get_data(item)#

Convenience method to fetch the data associated with a QxxWidgetItem.

mimeData(selected_items)#

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()#

Return the list of MIME Types supported for this object.

set_data(item, data)#

Convenience method to set data associated with a QxxWidgetItem.