Prevent QGIS window resize when switching between plugin #39#131
Merged
antoniolocandro merged 1 commit intoFLYGHT7:mainfrom Mar 29, 2026
Merged
Conversation
- Updated minimum sizes for various dock widgets to allow for more flexible resizing. - Removed hardcoded minimum height settings in `qpansopy_omnidirectional_dockwidget.py` and `qpansopy_sid_initial_dockwidget.py` to prevent QGIS window resizing. - Adjusted UI files for multiple dock widgets to set minimum sizes to 250x200 and maximum sizes to unlimited. - Enhanced log panel configurations in several dock widgets to improve usability and prevent layout issues. - Implemented scroll area wrappers for docks lacking them to avoid excessive height requests on first opening. - Added detailed comments and documentation throughout the code for better maintainability and understanding.
antoniolocandro
pushed a commit
that referenced
this pull request
Apr 27, 2026
Added to qt_compat.py: - QFrame_NoFrame (QFrame.Shape compat) - QSizePolicy_Preferred/Fixed/Expanding/Minimum/Maximum (QSizePolicy.Policy compat) - QFormLayout_AllNonFixedFieldsGrow (QFormLayout.FieldGrowthPolicy compat) - QTextEdit_WidgetWidth/NoWrap (QTextEdit.LineWrapMode compat) - QLayout_SetDefaultConstraint (QLayout.SizeConstraint compat) - Added QFrame, QSizePolicy, QLayout to all three backend import blocks Fixed qpansopy.py (PR #131 dock size constraint code): - Qt.ScrollBarAsNeeded -> Qt_ScrollBarAsNeeded - QSizePolicy.Preferred/Fixed/Expanding/Minimum -> QSizePolicy_Preferred/... - QFrame.NoFrame -> QFrame_NoFrame - QFormLayout.AllNonFixedFieldsGrow -> QFormLayout_AllNonFixedFieldsGrow - QTextEdit.WidgetWidth -> QTextEdit_WidgetWidth - QLayout.SetDefaultConstraint -> QLayout_SetDefaultConstraint All other PR changes already correctly integrated: - utils.py: as_html param in format_parameters_table - holding/vss/wind_spiral/ils/oas_ils dockwidgets: QMimeData HTML+text copy - holding.py: summary dict + summary_text + QgsField attributes + _offset_by_angle - feature_merge.py: Qgis import (uses qgis.PyQt.QtCore for QVariant) - conv_initial_approach.py: area_side field + routing name check removed - lnav_dockwidget.py: missed/SID approach routing simplified - wind_spiral.py: as_html param forwarded Tests: 45 passed, 1 skipped
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Resolves issue #39 where QGIS main window would resize unexpectedly and display geometry errors when switching between plugin dockwidgets. The fix implements QScrollArea wrappers for all dockwidgets, aggressive size constraints, optimized timing delays, and improved geometry pre-calculation. All dockwidgets now open smoothly without resizing the QGIS window, even on first use.