I worked around my first problem by enabling and disabling autoexpand, depending on the item that is below the mouse during a drag action:
def dragMoveEvent(self, event):
item = self.model().proxy_item(self.indexAt(event.pos()))
if hasattr(item, 'query'):
# second level
self.setAutoExpandDelay(-1)
else:
# top level
self.setAutoExpandDelay(500)
def dragMoveEvent(self, event):
item = self.model().proxy_item(self.indexAt(event.pos()))
if hasattr(item, 'query'):
# second level
self.setAutoExpandDelay(-1)
else:
# top level
self.setAutoExpandDelay(500)
QtGui.QTreeView.dragMoveEvent(self, event)
To copy to clipboard, switch view to plain text mode
But that's just gross. And it doesn't solve my second problem. Any other ideas?
Bookmarks