Closed xxjapp closed 10 years ago
I think you're just overwhelming the system. I added a sleep 0.1 after your emit test and it works for me.
@jmthomas That is just a demo app. In my real app, the emits are not so quick as the demo. I also have tested sleep solution both in the demo and my real app. Both of them still suffer freeze once in a while.
You might need to buffer up the emits or do something to ensure they aren't coming out too fast. Also make sure to not access QT GUI methods from another thread. If you need to do this wrap your code with Qt.execute_in_main_thread(true) {
@jmthomas Thanks for your answer. I'm sure that there is no access QT GUI methods from another thread.
Now I use a timer in main thread to update the GUI status and a queue to keep data which need to be sent to main thread. I think the queue is something like the buffer you said.
By the way, my app is here: https://github.com/xxjapp/auto_enc
My app freezes when I use emit to update status on GUI.
My test environment
The demo app is present below.