Here are the examples of the python api PyQt4.QtGui.QTreeView.dropEvent taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
Example 1
def dropEvent(self, event):
Event handler for `QDropEvent` events.
If an icon is dropped on a free area of the tree view then the
icon URL is converted to a path (which we assume to be an `HDF5`
file path) and ``ViTables`` tries to open it.
:Parameter event: the event being processed.
mime_data = event.mimeData()
if mime_data.hasFormat('text/uri-list'):
if self.dbt_model.dropMimeData(\
mime_data, QtCore.Qt.CopyAction, -1, -1, self.currentIndex()):
event.setDropAction(QtCore.Qt.CopyAction)
event.accept()
self.setFocus(True)
else:
QtGui.QTreeView.dropEvent(self, event)
Example 2
Project:
picard
License:
View license
Source File:
itemviews.py
Function:
drop_event
def dropEvent(self, event):
return QtGui.QTreeView.dropEvent(self, event)
Categories
python