techartorg / bqt

A Blender add-on to support & manage Qt Widgets in Blender (PySide2)
https://github.com/techartorg/bqt/wiki
Mozilla Public License 2.0
161 stars 23 forks source link

Linux Support ? #70

Closed hasielhassan closed 11 months ago

hasielhassan commented 1 year ago

I've recently started a new project and I found that bqt could be extremely beneficial to it. However, I've noticed that there's currently no Linux support for bqt. As a Linux user, this is a crucial feature for me. I understand that what bqt is already doing is complex and adding Linux support may present specific challenges, specially considering all the different window systems available and the Wayland monster under the bed, but maybe a simple X11 version can be a good start ?

Although I'm not an expert, I have some experience with Python and Qt, and I'd love to offer my help in bringing Linux support to bqt. I'm looking forward to your thoughts on this, any previous attempts or known blockers, any advice or resources that could help me in potentially giving it a try will we awesome!

What I already tried was to use xprop to get the window id and return it as part of the _get_application_hwnd method, but that doesn't seem to work properly, the Blender Qt window container is actually visible as a second window, the new widgets are not parented on top of the original blender window but the Blender Qt one, and the window is frozen, I need to run QApplication.processEvents() to refresh.

Its also intriguing that you didn't create an event loop, but I'm sure there might be some design reasons for that

Thanks in advanced!

hannesdelbeke commented 1 year ago

Hi, welcome hasielhassan👋 we d love to get your help with adding linux support.

If you look at the code you ll see there is a windows and mac class that inherit from the bqt application class. You can add another one for linux.

There have been no previous attempts.

There used to be an event loop, but it was removed since qt worked on windows in Blender without it. Likely cause blender alrdy has its own event loop for it's UI. Investigating in a new issue: https://github.com/techartorg/bqt/issues/74

bqt for Mac hasn't been tested in years. We dont have an active dev on it.

hannesdelbeke commented 1 year ago

Note: I believe the focus operator is windows only, and currently this attempts to run on all OS. This might cause issues

hannesdelbeke commented 1 year ago

Can I offer any help with this, or have you given up on this? Happy to have a look at your PR if you make one

hannesdelbeke commented 11 months ago

closing this thread since it seems inactive