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

Movable QGraphicsItem not rendering properly #16

Open
RUH27 opened this issue Jun 27, 2024 · 2 comments
Open

Movable QGraphicsItem not rendering properly #16

RUH27 opened this issue Jun 27, 2024 · 2 comments

Comments

@RUH27
Copy link

RUH27 commented Jun 27, 2024

Hello, I copied one of the codes in this tutorial: https://www.pythonguis.com/tutorials/pyqt-qgraphics-vector-graphics/, the one where setting flag that makes item movable. When I run the code and move with the circle it renders too slow, however, when I take a printscreen, everything looks right (not as in the photo bellow). In NVIDIA control panels I tried to change the setup of vertical synchronisation but with no success. Thanks for advice.
qt_circle

@RUH27
Copy link
Author

RUH27 commented Oct 5, 2024

Luckily, ChatGPT has an answer: just this line

view.setViewportUpdateMode(QGraphicsView.ViewportUpdateMode.FullViewportUpdate) # Update the full viewport

@mfitzp
Copy link
Member

mfitzp commented Oct 14, 2024

Glad you found a solution @RUH27 although that's not really a "fix", in that it has performance impacts for most normal uses. You normally only want to turn that on when you have many thousands of small objects in the view.

Can you let me know which version of Qt/PySide/PyQt you're using? I suspect this is a bug in the version, would be good to test & isolate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants