hello there,

i have qlistviewItems in a qlistview and when i want to drag and drop a new item inside the qlistview but i want to move the items which were already there in to the new item. I mean to say is that the items should become the children of the new draged item.

Here i have my piece of code:

Qt Code:
  1. item->setText( MY_ID, "" );
  2. item->setPixmap( COL_ID, QPixmap() );
  3. item->setText( COL_ID, "" );
  4. item->setPixmap( COL_ID, QPixmap() );
  5. item->setText( COL_ID, "" );
  6. item->setExpandable(true);
  7. item->setOpen(true);
  9. item = new QListViewItem(item,"testr", "", "tested", "", "" );
  10. item->setPixmap( COL_ID, QPixmap::fromMimeSource("test.png") );
  11. item->setExpandable(true);
  12. item->setOpen(true);
  14. item = new QListViewItem(item,lastitem);
  15. item->setExpandable(true);
  16. item->setOpen(true);
  17. event->accept(true);
  18. break;
To copy to clipboard, switch view to plain text mode 

in lastitem i have stored the last item and that should become child of this new qlistviewitem. but i get an empty child and the last item stands on its place.

plz take a look at it.thanx
ps: i use QT 3