[Qt-interest] "Unable to save type" when drag in a QTreeWidget
Andreas Pakulat
apaku at gmx.de
Tue Aug 17 09:51:19 CEST 2010
On 17.08.10 09:32:41, cabieces julien wrote:
> Hi,
>
> I want to develop drag and drop in a QTreeWidget. So, I implement
> dragEnterEvent, dragMoveEvent and dropEvent methods. It works fine but when
> I drag, I got this message :
>
> QVariant::save: unable to save type 136.
>
> Where type 136 belongs to QMetaType::ObjectStar type. It comes from the fact
> that I filled my QTreeWidgetItem data with "QObject*" objects and Qt try to
> serialize it in a DataStream but it doesn't have the appropriates operator<<
> and operator>>.
>
> So, I would like to know the good way to implement drag'n drop or maybe the
> way to prevent from this message.
Implementing DnD with Itemviews is described in the Qt documentation:
http://doc.trolltech.com/latest/model-view-dnd.html
Andreas
--
You'll be sorry...
More information about the Qt-interest-old
mailing list