I'm working on an application which uses QTreeView and an underlying model implementation of my own. I want to provide the user drag and drop reordering as follows: As the user performs a drag operation over the tree, the mouse cursor needs to change to provide feedback to the user indicating what would happen were the user to perform the drop at the mouse's current location. That is, I want the mouse cursor should change during the drag to indicate if the drop would occur before, after or as a child of the entry over which the mouse is currently hovering. In addition to changing the cursor I also want to change the message in the status bar to indicate exactly where the drop would occur.

All my code works except for the fact that I'm unable to get the selected cursor to display. Instead, once the drop is completed, the cursor changes to the last cursor I selected.

My implementation works by subclassing QTreeView and overriding several methods: mousePressEvent(), mouseMoveEvent(), dragMoveEvent(), dragEnterEvent(), dragLeaveEvent() and dropEvent(). My dragMoveEvent() creates the QDrag object, drag; and calls drag->exec(). In my dragMoveEvent() my code decides which cursor to display and calls this->setCursor( theSelectedCursor ). It's also here that I call this->setStatusTip( theDropLocationString ).

However, when I run and attempt to perform a drag operation, my cursor does not change and my status tips are not displayed. Once the drop is completed, drag->exec() returns, at that point my drag cursor changes to the whatever cursor was selected in this->setCursor().

Is there any way that I can force the mouse cursor to change during the drag?

Thanks,
Ron