Hi guys,
I just ran into the problem that my custom QListView class wouldn't
accept drop events.
After a bit of poking I found that the culprit was the
QtGui.QListView.IconMode which seemed to reject drop events as a side
effect (bug or feature I don't know).
So I then proceeded to use setAcceptDrops(True) to explicitly allow drop
events, but to no avail.
However, and this is what feels like a bug, if I use
setAcceptDrops(False) it does accept drop events.
Am I misunderstanding the use of this or is this a bug?
Some examples:
this will accept drop events:
view = QtGui.QListView()
this will NOT accept drop events (contrary to the docs
<https://srinikom.github.io/pyside-docs/PySide/QtGui/QListView.html#PySide.QtGui.PySide.QtGui.QListView.setViewMode>):
view = QtGui.QListView()
view.setViewMode(QtGui.QListView.*IconMode*)
this will NOT accept drop events (bug?):
view = QtGui.QListView()
view.setViewMode(QtGui.QListView.IconMode)
view.setAcceptDrops(*True*)
this will accept drop events (bug?):
view = QtGui.QListView()
view.setViewMode(QtGui.QListView.IconMode)
view.setAcceptDrops(*False*)
I am using PySide 1.2.2 and QT 4.8.7
Cheers,
frank
--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
<http://ohufx.com/index.php/vfx-compositing> | *workflow customisation
and consulting <http://ohufx.com/index.php/vfx-customising>* *
_______________________________________________
PySide mailing list
PySide@qt-project.org
http://lists.qt-project.org/mailman/listinfo/pyside