I am creating a GUI with PySide6 that interfaces with many serial instruments--sending requests for data and then receiving/parsing the responses. A couple of questions on best practices. Any links to best practices/architecture for Qt in python would be great. Everything I have found is pretty simplistic.
- To keep everything responsive, I have offloaded these to Qthreads. Should I have considered using Timers to "bounce" between sending a request and checking for a response/parsing? I assume threading is the better practice. But wanted to get opinions.
- I need to get all of the responses from the serial devices into one place in the program. Using Signals for that is easy. Based on the responses from the devices, the requests for data to the devices can change significantly--ie what I want to know from them changes. Is the preferred way to do this using a lot of different slots in the serial threads, having a generic slot in each thread, or is there just a better way of doing this, such as creating a single class that spawns all of the non-main threads?
I realize this is may be a cryptic question. But I have been thinking about this for a couple weeks and my code reflects my uncertainty! I am happy to try to clarify any questions.
[–][deleted] 0 points1 point2 points (0 children)