Skip to content

fix(qt): propagate progress dialog cancellation - #1290

Open
Vamsi-2581 wants to merge 3 commits into
enthought:mainfrom
Vamsi-2581:fix/qt-progress-dialog-cancel-135
Open

Vamsi-2581 wants to merge 3 commits into
enthought:mainfrom
Vamsi-2581:fix/qt-progress-dialog-cancel-135

Conversation

@Vamsi-2581

@Vamsi-2581 Vamsi-2581 commented Oct 29, 2026 •

Copy link
Copy Markdown

Summary

Fixes #135 by making Qt Cancel update the progress dialog's cancellation state before the dialog closes.

Root cause

The Cancel button's rejected signal was connected to the inner Qt dialog's reject method. That closed the dialog without setting ProgressDialog._user_cancelled, so update() could report success instead of cancellation. The Qt signal also supplies no argument, while the previous handler required one.

Changes

  • Connect the button box's rejected signal to ProgressDialog.reject.
  • Make the event argument optional so the zero-argument Qt signal can call it.
  • Add a regression test that clicks the actual reject-role button and checks the cancellation result and state.
  • Correct the test to locate the custom Cancel button by role; QDialogButtonBox.button() looks up standard buttons and cannot retrieve a custom role button.

Validation

The Qt GUI tests were not run in this environment. On the current head, GitHub's Qt/wx tests, EDM tests, docs build, and style check are all awaiting maintainer approval; none has produced a job result yet.

AI assistance: OpenAI Codex assisted with the implementation and regression test. Human review and hosted validation remain pending.

This branch has not been deployed

No deployments
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.

Buttons are not set up correctly in ui/qt4/progress_dialog.py

1 participant