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

wrapping window fails if preferences is open #65

Closed
hannesdelbeke opened this issue Mar 21, 2023 · 4 comments
Closed

wrapping window fails if preferences is open #65

hannesdelbeke opened this issue Mar 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@hannesdelbeke
Copy link
Collaborator

bqt wraps my preference window isntead of main blender window, if it opens on startup 😅
image

@hannesdelbeke
Copy link
Collaborator Author

second restart wrapped main window
image

@hannesdelbeke
Copy link
Collaborator Author

hannesdelbeke commented Apr 6, 2023

this is now handled with a hack,

i couldn't find a proper solution to find the main window.
so i'm using the window size for now and wrap the biggest window.

note this could still result in undesired wrapping if e.g. you have a render window open that's bigger than the default blender main window

both windows have the same process id. os.getpid()
they have a different handle, but same title & same window class. so AFAIK no way to find the main window.

@hannesdelbeke
Copy link
Collaborator Author

hannesdelbeke commented Apr 7, 2023

found a better solution.
get parent handle is 0 for the main window.
See https://blenderartists.org/t/bqt-custom-ui-for-add-ons-tool-in-blender-with-pyqt-or-pyside/1458808/7?u=h4nnes

@hannesdelbeke
Copy link
Collaborator Author

closed with proper fix.

@hannesdelbeke hannesdelbeke added the bug Something isn't working label Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant