[PySide] QMimeData type deleted prematurely when overiding mime-type in QStandardItemModel drag and drop

58 views
Skip to first unread message

Bjørn Helge Kjøsnes

unread,
Feb 2, 2011, 8:40:48 AM2/2/11
to pys...@lists.openbossa.org
Hello I have followed the mailing list a while and been using PySide
since it start working on Windows

I have been struggling with a drag and drop operation using
QStandardItemModel and a QListView for a while.

My goal is to use my own mime-type and send data defined in my custom
item model to another widget in the application. Whatever I did resulted
in the following error in one or another form:

python.exe main.py
Traceback (most recent call last):
File "main.py", line 23, in mimeData
self.__mimedata.setData(u'application/my-form',self.__qextra)
RuntimeError: Internal C++ object (PySide.QtCore.QMimeData) already deleted.
Traceback (most recent call last):
File "main.py", line 23, in mimeData
self.__mimedata.setData(u'application/my-form',self.__qextra)
RuntimeError: Internal C++ object (PySide.QtCore.QMimeData) already deleted.

I then created the attached application and tested it both PyQt4 and
PySide. It works as expected in PyQt4 but gives the error above in PySide.

I guess I have found a bug in the QMimeData model or do I used PySide
and QMimeData the wrong way?

I am using PySide 1.0.0.0 beta4 with Qt 4.7.1 and Python 2.6.6 on Windows 7

Thanks,
Bjorn Helge Kjosnes

main.py

Bjørn Helge Kjøsnes

unread,
Feb 2, 2011, 1:08:26 PM2/2/11
to pys...@lists.openbossa.org

Hi,

I added a ticket # 660 in Bugzilla on the bug.

Bjorn Helge Kjosnes

_______________________________________________
PySide mailing list
PyS...@lists.openbossa.org
http://lists.openbossa.org/listinfo/pyside

Reply all
Reply to author
Forward
0 new messages