Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ic_library_drag_and_drop.svg #13851

Closed
wants to merge 1 commit into from

Conversation

OfficialMunu
Copy link

@OfficialMunu OfficialMunu commented Nov 8, 2024

[BUG] Resolves #13836

setAcceptDrops(true): This enables the widget to accept drag and drop events.
dragEnterEvent: This event is triggered when a drag operation enters the widget. If the dragged data (like a file URL) is valid, we accept the drop and set the cursor to Qt::CopyCursor, which indicates that the object can be copied (or dropped).
dragMoveEvent: This event happens as the dragged object moves inside the widget area. It’s important to update the cursor here as well.
dragLeaveEvent: When the dragged object leaves the widget area without dropping, you should revert the cursor back to its original state.
dropEvent: Handles the final drop operation, where you process the dragged data (e.g., load the file onto the deck).

setAcceptDrops(true): This enables the widget to accept drag and drop events.
dragEnterEvent: This event is triggered when a drag operation enters the widget. If the dragged data (like a file URL) is valid, we accept the drop and set the cursor to Qt::CopyCursor, which indicates that the object can be copied (or dropped).
dragMoveEvent: This event happens as the dragged object moves inside the widget area. It’s important to update the cursor here as well.
dragLeaveEvent: When the dragged object leaves the widget area without dropping, you should revert the cursor back to its original state.
dropEvent: Handles the final drop operation, where you process the dragged data (e.g., load the file onto the deck).
@Swiftb0y
Copy link
Member

Swiftb0y commented Nov 8, 2024

you copy-pasted example code into a vector graphics file?

@Swiftb0y Swiftb0y closed this Nov 9, 2024
@OfficialMunu OfficialMunu deleted the BUG/Drag_n_Drop branch November 9, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drag n drop from file manager to deck doesn't show drag cursor like when dragging from deck to deck
2 participants