Skip to content

Drag and Drop #39

Open
Open
@jamesdbrock

Description

@jamesdbrock

https://doc.qt.io/qtforpython-6/overviews/dnd.html#drag-and-drop

https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QWidget.html#PySide6.QtWidgets.PySide6.QtWidgets.QWidget.acceptDrops

I think the best way to support this would be to add an on_drop prop to the View.

class View(_LinearView):

 def __init__(self, layout: tp.Text = "column", on_drop: tp.Optional[tp.Callable[[QDropEvent], tp.Any]], **kwargs): 

Then we can put a View around any region which we want to be droppable.

Maybe we also need the other events, QDragEnterEvent, QDragMoveEvent, QDragLeaveEvent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions