[Solved] QListView: ReOrdering list Items using Drag and Drop.

I am implementing the Drag and Drop functionality in a listView, I implemented the methods given in the documentation , the drag and drop works correctly , However the listitem are not ordered properly. I have also subclassed QStandardItemModel and overridden

I am sorry Andre, I dont want to create a new thread, I just got a bit confused . Should I use a single topic for an entire requirement or should I seperate each topic as I did here.

I dont have any problem if all the topics are merged at a single place. I cant delete all the other threads that I have created, If it is against the rules of the forum I humbly request you (moderator) to take necessary actions/delete the other topics as well.

You keep on making topics for aspects of your problem, without ever giving the big picture. That is very annoying. It seems that you want to achieve some bigger goal, but you have no clue how to do it. Or rather, you are just trying different approaches and ask about your issues with those, instead of asking about your real problem. Rather like "this":http://mywiki.wooledge.org/XyProblem fenomenon. This is also an "item":http://www.catb.org/esr/faqs/smart-questions.html#goal in the FAQ on how to ask smart questions.

So: first be clear about what you are trying to achieve, then discribe how you tried to achieve that, and what your problems were with that approach (or those approaches). Then ask for suggestions on how to solve your actual issue.

So far the drag and drop functionality works as expected and the item are arranged properly in the listView. I have also tried to implement a scrolling functionality that scrolls the listView up/down based on the visible row(top row n bottom row) in the viewport->rect() while dragging an item.

I am changing the verticalScrollBar value inside the dragMoveEnter() event

where currentRow is the row where the mouse position is while dragging the item.

However the scroll bar value changes only on mouseMove / dragMove , means if i have 1000 items in the list then at the last row in the visible viewport() i have to keep on moving the mouse to scroll down, But I want to create a functionality like if the item is dragged and is at the top/bottom row in the visible region then the scroll bar should move up/down automatically.

Is it possible to get continuous events or a sensitve area that fires the signal continuously if mouseOver?

My ListView contains a customWidget which is added using setIndexWidget(),where customWidget has few components like a combobox + lineEdits + labels , So far I have installed eventFilter for my customWidget that works fine, How can i set eventFilters for my listView so that If any widget on the customWidget is selected then the currentIndex/currentItem in the listView gets highlighted/selected.

I am unable to drag and drop with link action. If understand well, with link action, we can drag the references of the items so that any changes made in the source items will reflect the destination items(which is my requirement). Unfortunately, I couldn't succeed. If this is the big topic then i would open a new thread.