Python Forum
Best way to accomplish this task using PyQt5? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: Best way to accomplish this task using PyQt5? (/thread-5339.html)



Best way to accomplish this task using PyQt5? - uduse - Sep-29-2017

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.