SG-41170: Restore QMessageBox as the alertPanel() cmd implementation #992
+14
−389
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SG-41170: Restore QMessageBox as the alertPanel() cmd implementation
Linked issues
NA
Describe the reason for the change.
With the aim of fixing a Tahoe Qt specific issue, the alertPanel()'s implementation was recently changed to use a custom QAlertPanel instead of a QMessageBox.
This solved the Tahoe issue but some other issues were found with the new QAlertPanel based implementation: alertPanel() could be resized and it would truncate text when increasing RV font size.
Now instead of fixing all these new issues in the new QAlertPanel, and for the sake of uniformization since that the RV C++ code is using QMessageBox, NOT QAlertPanel (only the alertPanel() command used by mu and python plugin are making use of the new custom QAlertPanel), we decided to take another look at how we could solve the original Tahoe specific issue with the unclickable button.
After some investigation, we realized that the original Tahoe specific issue could be solved by ensuring that the widget-based implementation is used instead of the native dialog:
QApplication::setAttribute(Qt::AA_DontUseNativeDialogs);This way, both the mu+python alertPanel command and the RV C++ code can use the original QMessageBox as it has been doing in the last 15 years.
Summarize your change.
On macOS, now ensuring that the widget-based implementation is used instead of the native dialog:
QApplication::setAttribute(Qt::AA_DontUseNativeDialogs);Restore the QMessageBox original used in the alertPanel() command implementation
Describe what you have tested and on which operating system.
Successfully tested on macOS Sequoia 15.7.2 andd macOS Tahoe 26.1
Add a list of changes, and note any that might need special attention during the review.
If possible, provide screenshots.
Before - alertPanel shows truncated text:

Before - alertPanel can be resized (it should not):

After - On macOS Tahoe: (and the buttons are working)
