QCustomFileDropZone
Drag-and-drop file input with click-to-browse.
A dashed zone that accepts dropped files (filtered by extension) or opens
a file dialog on click. Highlights while dragging (a dragActive property).
Tokenized. Emits filesDropped / filesChanged.
At a glance
| Tier | Free (GPLv3) |
| Import | from Custom_Widgets.QCustomFileDropZone import QCustomFileDropZone |
| Qt Designer | Yes — drag it from the palette |
Quick start
from Custom_Widgets.QCustomFileDropZone import QCustomFileDropZone
widget = QCustomFileDropZone()
Dark theme
Colours come from the design tokens, so the widget follows the app theme with no extra work.
Signals
| Signal |
|---|
filesChanged(QVariantList) |
filesDropped(QVariantList) |
Methods
| Method | Description |
|---|---|
clear() | Clear. |
files() | Files. |
filesChanged(...) | Files changed. |
filesDropped(...) | Files dropped. |
setAcceptedExtensions(extensions) | Set the accepted extensions. |
setMultiple(multiple) | Set the multiple. |
Theming
Colours come from the design tokens, so they follow the active theme. Roles used: surface, surface-muted, on-surface, outline, accent.
See Design tokens.
Related
QCustomButtonGroup · QCustomCheckBox · QCustomColorPicker · QCustomComboBox · QCustomDateEdit · QCustomDateRangePicker · QCustomEmojiPicker · QCustomForm