From kde-devel Fri Feb 25 01:53:18 2005 From: Stephan Olbrich Date: Fri, 25 Feb 2005 01:53:18 +0000 To: kde-devel Subject: KListView with drag and drop Message-Id: <200502242053.18500.stephanolbrich () gmx ! de> X-MARC-Message: https://marc.info/?l=kde-devel&m=110929640418727 Hi, I'm starting to write my first KDE-Program and trying to find out the way how to do stuff in KDE. The main widget in my program is a KListView which displays XML-Data. I managed to activate drag and drop, so I can move items around. What I now need to do is, making some restrictions. Some items make no sense as top-level items. Others shouldn't be moved at all. Or I want a dialog to ask the user, if a drop is ok. And other stuff like this. Another thing is that I want to drag and drop between two applications. Searching through the documentation and other code got me quite confused. The contentDrag*Event functions seemed to be used quite often, although I'm not shure if there is an easier way. (e.g. there is already this bar, which shows where the items is going to be inserted, so maybe there is a function which is called every time the bar jumps to another place so I can say there weather the item can be inserted here or not?) So if someone could explain, which functions are used what for and what I need to reimplement, it would be really helpful. dropped() seems to be emmited after insertion of the item, is there a way to manipulate the drop ? (e.g. I want to insert the subitems of a whole tree, instead of the tree) For drag and drop between applications I somehow need to define my own mime-type as far as I understood. Is there any tutorial or something how this is done? Thanks for your help! Stephan >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<