list
Classes:
|
A |
- class Drag_List(self, /, parent: PySide6.QtWidgets.QWidget | None = None, *, count: int | None = None, currentRow: int | None = None, sortingEnabled: bool | None = None)[source]
Bases:
QListWidgetA
QtWidgets.QListWidgetthat is capable of having files dragged & dropped.copied with much gratitude from stackoverflow
Primarily used in
Sound_Widgetto 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
Initialize self. See help(type(self)) for accurate signature.
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.CopyActiondropEvent(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 = PySide6.QtCore.QMetaObject("Drag_List" inherits "QListWidget": Methods: #83 type=Signal, signature=fileDropped(QVariantList), parameters=QVariantList )