0

I am developing a GUI for a USB device using PySide 6. My application has two threads: one for the UI and another one for communicating with the device. The UI thread puts requests to the device in a queue, which are then picked up and processed by the second thread. My goal is to update the UI (e.g. display a value on QLCDNumber) whenever the device responds. For that, I want to add callback functions to the QWidget objects, which would be passed along with the requests and called for refreshing the UI when the responses arrive. The problem is that I would need to make the entire UI thread-safe since the callbacks would be executed in the second thread. Is there any way to make them run in the UI thread instead?

CreFroD
  • 97
  • 1
  • 11

0 Answers0