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

QFileDialog seems broken since 1.3.1 #116

Closed ElgoogUdiab closed 7 months ago

ElgoogUdiab commented 7 months ago

When I am trying to create a Open File dialog using the following code snippet:

QtWidgets.QFileDialog.getOpenFileName(None, "Choose Package", "", "Zip Files (*.zip)")

it seems that two window are created: a normal windows containing normal file dialog content and an empty window. The first one (the normal one) will only show up for less than a second and then disappear, and the second one (the empty one) will be left behind.

This behavior shows up since 1.3.1 and it works fine on 1.3.0.

hannesdelbeke commented 7 months ago

this sounds like a bug with the auto parenting,

work around

a workaround is to disable this with the env var BQT_AUTO_ADD set to 0 see https://github.com/techartorg/bqt/wiki/Environment-variables

i ll have a test myself and see if i can submit a fix

hannesdelbeke commented 7 months ago

i had a look at the changelog between 1.3.0 and 1.3.1 (thanks a lot for providing versions, this helps a lot) it seems this was when the auto dockable wrap was added.

work around

you can work around this by setting BQT_DOCKABLE_WRAP to 0 see https://github.com/techartorg/bqt/wiki/Environment-variables

ElgoogUdiab commented 7 months ago

work around

you can work around this by setting BQT_DOCKABLE_WRAP to 0 see https://github.com/techartorg/bqt/wiki/Environment-variables

This workaround works. Thanks a lot.

Also, I've just upgraded bqt to 1.4.1 recently. This problem seems fixed.