Skip to content

fix(dialog-sdk): disable acceptDrops on ChartPreviewWidget for DropEventFilter compatibility#58

Merged
pabloinigoblasco merged 1 commit into
developmentfrom
fix/chart-preview-accept-drops
Apr 16, 2026
Merged

fix(dialog-sdk): disable acceptDrops on ChartPreviewWidget for DropEventFilter compatibility#58
pabloinigoblasco merged 1 commit into
developmentfrom
fix/chart-preview-accept-drops

Conversation

@pabloinigoblasco
Copy link
Copy Markdown
Collaborator

@pabloinigoblasco pabloinigoblasco commented Apr 15, 2026

Summary

QGraphicsView (parent of QChartView/ChartPreviewWidget) enables acceptDrops by default. This causes it to consume drag-drop events silently, preventing them from reaching the dialog-level DropEventFilter.

Fix: disable acceptDrops on both the widget and its viewport in the constructor, so drag events propagate to the parent QFrame where the DropEventFilter can handle them.

Discovered when porting the FFT toolbox — drag-drop onto the input chart area didn't work because QGraphicsView was eating the events.

Test plan

  • Drag a field from the series tree onto a QFrame containing a ChartPreviewWidget — drop event reaches the plugin
  • ChartPreviewWidget still renders series correctly (no regression)

…entFilter compatibility

QGraphicsView (parent of QChartView/ChartPreviewWidget) enables
acceptDrops by default. This causes it to consume drag-drop events
silently, preventing them from reaching the dialog-level DropEventFilter.

Disable acceptDrops on both the widget and its viewport in the
constructor so drag events propagate to the parent QFrame.
@pabloinigoblasco pabloinigoblasco merged commit e262446 into development Apr 16, 2026
2 checks passed
@pabloinigoblasco pabloinigoblasco deleted the fix/chart-preview-accept-drops branch May 4, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant