-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: avoid app freeze on mac #983
Conversation
After recent changes to allow native file browsers, clicking the button would apparently create a dialog on mac but it was not visible. Because it was modal the app would be alive but unresponive. This change replaces show() and raise() which work for QDialog with exec() which is apparently needed for the native dialog to work properly. https://discourse.slicer.org/t/slicer-is-freezing-on-macos-when-clicking-on-import-dicom-files/18624 Co-authored-by: Andras Lasso <lasso@queensu.ca>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise+show was an undocumented way of displaying a popup, so it is better to switch to exec.
We could probably don't need We may also consider using |
At least with raise and show this change made the dialog appear, but you could still click on buttons and interact with the app even though the dialog remained on top, so very unconventional behavior.
I never saw bad behavior with that one, probably because it's a non-native dialog, so I left it as-is. |
OK. Maybe just add a comment there, that |
May want to already begin using
https://doc.qt.io/qt-5/qdialog.html#exec |
This behaves the same as It turns out So I think we're good with this and ready to merge. |
I agree, the current content of the PR looks good to me. |
commontk/CTK#983 Closes #5739 CTK: $ git shortlog --no-merges a964dcc..693c99a Steve Pieper (3): BUG: avoid app freeze on mac SYTLE: remove dead code STYLE: add comment about QWidget
commontk/CTK#983 Closes #5739 CTK: $ git shortlog --no-merges a964dcc..693c99a Steve Pieper (3): BUG: avoid app freeze on mac SYTLE: remove dead code STYLE: add comment about QWidget
commontk/CTK#983 Closes Slicer#5739 CTK: $ git shortlog --no-merges a964dcc..693c99a Steve Pieper (3): BUG: avoid app freeze on mac SYTLE: remove dead code STYLE: add comment about QWidget
After recent changes to allow native file browsers,
clicking the button would apparently create a dialog
on mac but it was not visible. Because it was modal
the app would be alive but unresponive.
This change replaces show() and raise() which work
for QDialog with exec() which is apparently needed
for the native dialog to work properly.
https://discourse.slicer.org/t/slicer-is-freezing-on-macos-when-clicking-on-import-dicom-files/18624
Co-authored-by: Andras Lasso lasso@queensu.ca