Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
juizoi opened this issue May 4, 2023 · 10 comments
Closed
Labels
bug Something isn't working

Comments

@juizoi
Copy link

juizoi commented May 4, 2023

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

@hannesdelbeke
Copy link
Collaborator

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 #3

@juizoi
Copy link
Author

juizoi commented May 4, 2023

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
Copy link
Collaborator

hannesdelbeke commented May 30, 2023

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

  • maximises window, tested
    parent_window.setWindowState(QtCore.Qt.WindowMaximized)

  • get code to test slider widget. copy paste this in blender console when bqt is running

from PySide2.QtWidgets import QWidget, QSlider, QVBoxLayout, QApplication

widget = QWidget()
slider = QSlider()
# slider.setOrientation(Qt.Horizontal)
layout = QVBoxLayout()
layout.addWidget(slider)
widget.setLayout(layout)
widget.show()

@hannesdelbeke
Copy link
Collaborator

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
Copy link
Collaborator

created a new issue for first time blender window wrap is too small #72

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

@hannesdelbeke hannesdelbeke added the bug Something isn't working label Jun 5, 2023
@hannesdelbeke
Copy link
Collaborator

current workaround: disable qt wrapping with BQT_DISABLE_WRAP set to 1

@hannesdelbeke
Copy link
Collaborator

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
Copy link

#109 I can reproduce this problem

@atticus-lv
Copy link

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
Copy link
Collaborator

hannesdelbeke commented Jul 23, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants