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

add QProxyStyle #406

Closed
wants to merge 1 commit into from
Closed

Conversation

robertjoosten
Copy link

Previously unable to access QProxyStyle as it was not mapped.

@CLAassistant
Copy link

CLAassistant commented May 10, 2024

CLA assistant check
All committers have signed the CLA.

@robertjoosten
Copy link
Author

i needed to test to see if it worked for the other bindings as well
which I see it doesn't. Does this go against the commonality of all Qt versions or is there a way to slot it in?

@mottosso
Copy link
Owner

Does this go against the commonality of all Qt versions or is there a way to slot it in?

Yes unfortunately this won't work. It would mean you could write a UI with Qt.py, and sometimes it would work, sometimes it would not. Based on what bindings the user would have available. It's important that if it works at all, it should work on all bindings, and PySide2 is still the source of truth for what exists and where.

@mottosso mottosso closed this May 14, 2024
@mottosso
Copy link
Owner

For completeness, the recommended workflow for when you have binding-specific requirements is to explicitly include these, e.g.

import Qt

try:
   from PySide6.QtCore import QProxyStyle
   CAN_PROXY_STYLE = True
except ImportError:
   CAN_PROXY_STYLE = False

And thus you can design your code to take this into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants