BQT: custom UI for add-ons & tool in Blender with PyQt or PySide

The dependence on other projects is always a tricky subject, involving lots of technical considerations.

Besides that, they try to avoid pop-ups in Blender whenever possible. They literally don’t want the N-Panel to be a pop-up.

Edit: I don’t want to derail the topic! Just wanted to make sure that even though not being able to move the N-Panel around, which may appear like a technical limitation, it is actually a decision that was deliberately made (at least not to allow it to be a pop-up)

1 Like

yes that’s also why there are not a fan of QT widgets.
which often are pop ups or separate windows like in max or maya.

1 Like

Exactly. Nevertheless, your project appears very interesting!

Hi everyone first I want to thanks @H4nnes for this nice wrapper for Blender I downloaded the code I’m learning HTML, CSS and JavaScript I understand code and I decided to update this wrapper with QTWebEngine to create an LLM chat for blender with web technology this is experimentation I’m using Cursor IDE with Claude 3.7 if any one interested I upload the project.
this is the chat interface running in blender inspired in Grok UI.

BQT PySide6 QTWebEngine in action

Hi this looks nice. Great job :+1:
Do you have a link to your code?
Does the QTWebEngine widget not work in bqt by default?

@H4nnes
Here is the code with the Build NextJS chat and other feature like a launch panel to launch the python script dialog or panel.

  • There is a bqt folder inside this folder is my updated code I don’t know much about python I’m learning.
  • In the bqt folder > scripts are all the sample script and chat_ui.
    bqt.zip (608.3 KB)

There is a glitch problem when you open the setting panel in the NextJS chat hope you can fix this looks like a problem with the Wrapper.

Thanks again for maintaining this, it’s really helped us move a team over to blender without having to drastically rewrite lots of pipeline UIs!

Is anyone else still getting issues with focus/ the ol’ alt-tab bug?

It seems like our only options at the moment are to either not have QT properly wrap, and then either set the windows to always be on top, or to get lost easily, or to have QT wrap, and have the alt bug.

Am I doing something wrong? Any clever workarounds anyone else found?

Thanks!

alt tab is still an issue, i tried a few hacks to fix it, like check for stuck keys like alt every frame, but the problem always came back in some form.

ideally someone figures out how Qt interacts with the key capturing, so we can fix it properly.
Since the Qt method that wraps a window in a Qt Window, says in the official docs it’s not officially supported and can be buggy, I don’t have much hope.

for now I suggest to disable wrapping, a minor inconvenience i’m afraid you have to pay for the cost of Qt.

1 Like

Thanks! I just wanted to check I wasn’t missing something really! I’ve made a button for “bring all my qt windows to the front” for now :smiley:

To make bqt successfull it would be nice if you guys could make an “example project” which wraps or translates/recreates npanel panels maybe per addon.

1 Like

it sounds like you want to learn how to make panels with qt / pyside.
there are many resources online for this.
and the AI chatbots can be very helpfull too.
just ask e.g. chatGPT for can you make a demo pyside6 window to see some code

recreating all Blender addons would take a lot of time, and i don’t understand why someone would need that.

Im not a programmer, but was playing with QT panels one day with chatgpt.
We ended up with such solution which is partially working, i.e. it may work as intended for a while, but bugout next time and arrangement of windows will be screwed for some reasons.

Main idea was to sort QT panel window in OS windows order to achieve “effect” of QT panel being parented to blender window, always stay on top, but allow to alt+tab to other application and keep QT window few levels below current active window.
Anyway, here’s a code if someone would be interested:
qt_window_handling_like_you_are_dumbass.py (6.1 KB)

Hi, that’s awesome, thank you for developing this!

My only issue is that we’re running Blender on Linux, is the Linux implementation already started? Else I might have to look into it, how hard would you estimate this to be for a quite advanced Python developer?

Dont think so.
Should be easy think there already is dummy code for linux.
Happy to help with advice on github prs

1 Like

can you just work with Blender devs to port Blender UI to QT. so much nicer and customizable than what blender has had for years.

1 Like