Hi, although I have not worked with drag and drop yet, to me it seems you might want to read (even further) through http://doc.trolltech.com/qtjambi-4.4/html/index.html <http://doc.trolltech.com/qtjambi-4.4/html/index.html> . I think you will have to subclass QTreeModel in order to make things work. Overwrite at least "public boolean dropMimeData(QMimeData data, Qt.DropAction action, int row, int column, QModelIndex parent)" if your model only contains Strings. If you are working with more complex data types you will need to look further into the whole MIME type business :-) Hope that helps, Curt
________________________________ Von: [EMAIL PROTECTED] im Auftrag von ?? Gesendet: Mi 27.08.2008 17:37 An: [email protected] Betreff: [Qt-jambi-interest] Help with Drag and Drop in QTreeView I have set the QTreeView as follows: ui.treeView.setDragEnabled(true); ui.treeView.viewport().setAcceptDrops(true); ui.treeView.setDropIndicatorShown(true); ui.treeView.setDragDropMode(QAbstractItemView.DragDropMode.InternalMove); Then what else need to be done with the QTreeModel, which is used as the tree model??? Can you tell me some details? An example will be better. I just want to implement the item's moving from one parent item to another item. Thanks. _______________________________________________ Qt-jambi-interest mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
