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

auto parent widgets without parent #71

Closed
hannesdelbeke opened this issue May 30, 2023 · 1 comment · Fixed by #81
Closed

auto parent widgets without parent #71

hannesdelbeke opened this issue May 30, 2023 · 1 comment · Fixed by #81
Labels
enhancement New feature or request

Comments

@hannesdelbeke
Copy link
Collaborator

hannesdelbeke commented May 30, 2023

devs currently need to manually parent any widget to the bqt window widget.
to ensure the qt widgets use

  • the blender stylesheet
  • and stay in front of blender, and are minimised when blender minimises

this means that any existing qt code that creates widgets needs to be changed, or the widget created needs to be parented.

A nicer way, would be to auto parent any qt widget.

proposal 1, monitor loop, auto parent top level widgets

  • an option in BQT to constantly check for widgets without parent.
  • if found parent the widget to the bqt window.

this means widgets created in bqt would just work.
no need for the dev/user to know how to parent it.
it would let the dev run pure qt code that also would work outside of blender, or inside blender without bqt.
whereas bqt parenting only works in blender if bqt is installed.

cons

some apps, e.g. Krita, have nearly every widget/menu as a top level widget.
So we can assume some devs might have done the same for their qt tools. In which case auto parenting them might break hierarchy.
No examples known currently except Krita which won't run in Blender

@hannesdelbeke
Copy link
Collaborator Author

affects

@hannesdelbeke hannesdelbeke added the enhancement New feature or request label Jun 5, 2023
@hannesdelbeke hannesdelbeke linked a pull request Jun 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant