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

Auto discover widgets #81

Closed hannesdelbeke closed 1 year ago

hannesdelbeke commented 1 year ago

auto discover top level widgets with no parent, and add them to our bqt manager

devs can just run simple code (native qt, no bqt code needed)

from PySide2.QtWidgets import QWidget
w = QWidget()
w.show()

no need to run the add command anymore

import bqt
bqt.register(w)

garbage collect note

so depending on your implementation it still might be easier to use bqt.register

If this feature causes issues, it can be disabled with the env var BQT_AUTO_ADD set to 0

hannesdelbeke commented 1 year ago

https://github.com/techartorg/bqt/issues/83 https://github.com/techartorg/bqt/issues/84