Problem: In the import wizard (DstListPage), the language selection buttons appear collapsed/overlapping with text labels truncated or showing only single letters, unlike the HomeView which displays them correctly in a proper grid.
What was tried:
- Changed
QVBoxLayout layout from member variable to pointer (QVBoxLayout *layout) with proper initialization
- Added
layout->setSizeConstraint(QLayout::SetMinimumSize) (but this was Android-only in HomeView)
- Added grid layout spacing with
layout->setSpacing(8) and margins with layout->setContentsMargins(0, 0, 0, 0)
- Added stretch factors to layout with
layout->addWidget(&test_buttons, 1)
- Added
adjustSize() to wizard's showEvent() to force resize
- Added column and row stretch factors to the grid layout
- Modified MultilinePushButton's refresh method with various layout constraints
Result: None of these changes fixed the root cause. The wizard window still doesn't expand to accommodate the button grid properly, leaving buttons compressed and text truncated. The difference between HomeView (QWidget) and DstListPage (QWizardPage within QWizard) suggests QWizard handles sizing differently and doesn't automatically resize to fit page content.
A better approach would be to layout the buttons in a flex grid and let the dialog set a width contraint on their content rather than the opposite.
Problem: In the import wizard (DstListPage), the language selection buttons appear collapsed/overlapping with text labels truncated or showing only single letters, unlike the HomeView which displays them correctly in a proper grid.
What was tried:
QVBoxLayout layoutfrom member variable to pointer (QVBoxLayout *layout) with proper initializationlayout->setSizeConstraint(QLayout::SetMinimumSize)(but this was Android-only in HomeView)layout->setSpacing(8)and margins withlayout->setContentsMargins(0, 0, 0, 0)layout->addWidget(&test_buttons, 1)adjustSize()to wizard'sshowEvent()to force resizeResult: None of these changes fixed the root cause. The wizard window still doesn't expand to accommodate the button grid properly, leaving buttons compressed and text truncated. The difference between HomeView (QWidget) and DstListPage (QWizardPage within QWizard) suggests QWizard handles sizing differently and doesn't automatically resize to fit page content.
A better approach would be to layout the buttons in a flex grid and let the dialog set a width contraint on their content rather than the opposite.