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
162 stars 23 forks source link

Changing any slider menu value moves the cursor to the center of the window #69

Closed juizoi closed 1 year ago

juizoi commented 1 year ago

After maximising the Blender Qt window, any changes I make to any slider in Blender's UI moves the cursor to the center.

hannesdelbeke commented 1 year ago

Thank you for reporting this issue.

could you describe how you maximise the window? asking since there are 2 ways to do so, 1 is not yet supported. see https://github.com/techartorg/bqt/issues/3

juizoi commented 1 year ago

I use a setWindowState(QtCore.Qt.WindowMaximized) in the create_global_app method. had to do this since the app was starting in a small window.

hannesdelbeke commented 1 year ago

Can you repro this without changing the source code for bqt? if so can you share the code you run.

widget = QWidget() slider = QSlider()

slider.setOrientation(Qt.Horizontal)

layout = QVBoxLayout() layout.addWidget(slider) widget.setLayout(layout) widget.show()

hannesdelbeke commented 1 year ago

FYI, window might be small first time you start it. but if you make it bigger, and restart blender. it should remember the last size and position it had. so might be only an issue the first time you start blender

hannesdelbeke commented 1 year ago

created a new issue for first time blender window wrap is too small https://github.com/techartorg/bqt/issues/72

this thread can focus on the problem of mouse resets to center if maximised

hannesdelbeke commented 1 year ago

current workaround: disable qt wrapping with BQT_DISABLE_WRAP set to 1

hannesdelbeke commented 1 year ago

afraid I can't repro this with the test code i created, hopefully this is now fixed. If not, feel free to reopen this. It be great to add some repro code, that anyone can run. in Blender, to reproduce the issue

atticus-lv commented 11 months ago

109 I can reproduce this problem

atticus-lv commented 11 months ago

if the only method to fix it is set BQT_DISABLE_WRAP to 1, is there a solution to let the qt widgets to hide and show when the blender window is focus or not?

hannesdelbeke commented 11 months ago

if the only method to fix it is set BQT_DISABLE_WRAP to 1, is there a solution to let the qt widgets to hide and show when the blender window is focus or not?

if BQT_DISABLE_WRAP is 1, bqt should automatically handle widgets in foreground if blender is in focus. to disable this behaviour you can set BQT_MANAGE_FOREGROUND to 0