Drag-n-drop improvements#209
Merged
tedwaine merged 1 commit intoAcademySoftwareFoundation:developfrom Feb 23, 2026
Merged
Conversation
… changing the cursor to be a grab of the item being dragged along with a badge showing the number of items being dragged. It also fixes some issues causing instabilities or awkwardness in the UI relating to drag-n-drop. Signed-off-by: Ken McGaugh <ken@mcgaugh.co.uk>
Contributor
|
I've tested on Linux and Windows too, working fine. Nice improvement! |
5b179d2
into
AcademySoftwareFoundation:develop
2 of 4 checks passed
Contributor
Author
|
Thanks @tedwaine! I still want to get this working using Drag attached properties instead of hijacking the system cursor. Do you have any ideas on why all the drop areas stop receiving drag events? I’ve made sure my mime types are compatible. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for a visual indicator both of what is being dragged as well as the number of items being dragged (for media items only).
It also fixes some issues with the current system, including stray drag indicators being left behind, runaway scrolling, and inadvertent reordering of media when an item is dropped on itself.
Note that the visual indicator is implemented by changing the system cursor to an image grabbed from the item under the mouse when the drag is initiated. I tried to get this working both by using a Drag attached property as well as instantiating a QDrag object in C++. In both cases it worked visually but the interface stopped receiving drag events and I couldn't figure out how to get that working. Because of this, you still cannot drag anything outside of xSTUDIO which I would like to be able to do in the future.
This has been tested under MacOS only at this point.