If I hide columns (not all, of course) in treewidget:
then "items" in
is empty. Why? :mad:
Printable View
If I hide columns (not all, of course) in treewidget:
then "items" in
is empty. Why? :mad:
I think if u call mimeData() .... YOU have to pass the "items" as argument.
Also...
Quote:
QMimeData * QTreeWidget::mimeData ( const QList<QTreeWidgetItem *> items ) const [virtual protected]
Returns an object that contains a serialized description of the specified items. The format used to describe the items is obtained from the mimeTypes() function.
If the list of items is empty, 0 is returned rather than a serialized empty list.
Hi aamer4yu,
I'm sory but I don't understand. I overwrite my own
It looks like that:
I must use "isSelected" because "items" is empty - but it's empty only when I hide some columns in the tree. Why, I don't know :confused:Code:
QByteArray data_items; QTreeWidgetItem *item; for (int i = 0; (item = topLevelItem(i)); i++) if (item->isSelected()) stream_items << reinterpret_cast<int> (item); return mime_items;