Python Forum

Full Version: Best way to accomplish this task using PyQt5?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am working on a project that involves these characteristics but I am not sure what is the best way to implement this using PyQt5 and Python 3.6.

Here are the requirements and features:
- Support 1000-10000 primitive type (circle, rect, line...) items in the window
- Some of the items won't move at all (e.g. obstacles), while some others always in motion
- At least 30 FPS
- The canvas can be panned and zoomed
- Need to add other widgets in the window so the canvas can't be the whole thing

I initially implemented this in wxPython. I did this by setting a timer with a specific cycle, and each time the timer triggers, the app repaint everything. I planned to do the same using PyQt5, with QPainter() and stuff. However, I noticed that there's a Graphics View and though it might be a better option.

What do you think? Any comment will be appreciated. Thank you.