list
Classes:
A |
- class Drag_List[source]
Bases:
PySide2.QtWidgets.QListWidget
A
QtWidgets.QListWidget
that is capable of having files dragged & dropped.copied with much gratitude from stackoverflow
Primarily used in
Sound_Widget
to be able to drop sound files.To use: connect fileDropped to a method, that method will receive a list of files dragged onto this widget.
- Variables
fileDropped (
QtCore.Signal
) – A Qt signal that takes a list
Attributes:
fileDropped
(*args, **kwargs)Call self as a function.
Methods:
When files are dragged over us, if they have paths in them, accept the event.
dragMoveEvent
(event)If the dragEnterEvent was accepted, while the drag is being moved within us, setDropAction to
QtCore.Qt.CopyAction
dropEvent
(event)When the files are finally dropped, if they contain paths, emit the list of paths through the fileDropped signal.
- fileDropped(*args, **kwargs)
Call self as a function.
- dragEnterEvent(e)[source]
When files are dragged over us, if they have paths in them, accept the event.
- Parameters
e (
QtCore.QEvent
) – containing the drag information.
- dragMoveEvent(event)[source]
If the dragEnterEvent was accepted, while the drag is being moved within us, setDropAction to
QtCore.Qt.CopyAction
- Parameters
event (
QtCore.QEvent
) – containing the drag information.
- dropEvent(event)[source]
When the files are finally dropped, if they contain paths, emit the list of paths through the fileDropped signal.
- Parameters
event (
QtCore.QEvent
) – containing the drag information.
- staticMetaObject = <PySide2.QtCore.QMetaObject object at 0x7efe5b4b1a40>