Skip to content
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

Fix missing maximize button for attribute form dialog on Windows #51511

Merged
merged 2 commits into from Jan 23, 2023

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Jan 18, 2023

On windows, the attribute form dialog misses the maximize button which can be very useful with large custom forms.

I've tried all possible combination of flags and even a custom windows API event manager but I couldn't make the maximize button appear when the Qt::Tool flag is set.

On  windows, the attribute form dialog misses the maximize button which can be very useful with large custom forms.

I've tried all possible combination of flags and even a custom windows API event manager but I couldn't make  the maximize button appear when the Qt::Tool flag is set.
@elpaso elpaso added GUI/UX Related to QGIS application GUI or User Experience Bug Either a bug report, or a bug fix. Let's hope for the latter! Windows Related to Windows operating system labels Jan 18, 2023
@github-actions github-actions bot added this to the 3.30.0 milestone Jan 18, 2023
@troopa81
Copy link
Contributor

I remember having quite the same issue and ending up with quite the same solution. LGTM

@elpaso
Copy link
Contributor Author

elpaso commented Jan 18, 2023

@troopa81 thanks for reviewing!

I'll wait a few days to merge, maybe someone knows a better way to fix this.

@m-kuhn
Copy link
Member

m-kuhn commented Jan 19, 2023

How does it behave if "select feature on canvas" from the relation widget or similar features with map canvas interaction are used from within the attribute form?

Looking at the doc Qt::Tool is a combination of Popup | Dialog. Would it be possible / reasonable to keep one of these. And/or apply the hint "If there isn't a parent, you may consider using Qt::WindowStaysOnTopHint as well."?

@elpaso
Copy link
Contributor Author

elpaso commented Jan 19, 2023

How does it behave if "select feature on canvas" from the relation widget or similar features with map canvas interaction are used from within the attribute form?

Looking at the doc Qt::Tool is a combination of Popup | Dialog. Would it be possible / reasonable to keep one of these. And/or apply the hint "If there isn't a parent, you may consider using Qt::WindowStaysOnTopHint as well."?

Qt::Dialog is already the default for a QDialog, I suspect that it is the Qt::Popup flag which prevents the maximize button to be shown whatever "hint" flag you set.

I will test the various workflows to make sure everything is still working as expected.

@elpaso
Copy link
Contributor Author

elpaso commented Jan 19, 2023

@m-kuhn I tested the last commit with a relation-ref widget with canvas selection and it seems to work just fine.

@m-kuhn
Copy link
Member

m-kuhn commented Jan 19, 2023

Thanks @elpaso

@elpaso elpaso merged commit a7de457 into master Jan 23, 2023
@elpaso elpaso deleted the bugfix-attribute-form-dialog-missing-maximize-button branch January 23, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience Windows Related to Windows operating system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants