开发者

Qt Signals/Slots and Threads

I'm new to GUI programming and multithreading. I am in the process of creating a real-time app that receives information from my car and renders it in some meaningful 开发者_如何转开发way. My app is layed out as 3 threads, the GUI (main thread), the rendering thread and the hardware comm thread. Inbetwen the the render and the hardware threads is a shared ring buffer. In the render I have created a timer so that it draws the new interface 20 times a second. I would like the thread to notify the main thread that there is a new screen available and I was thinking a signal/slots method would work the best for this. This gets down to my question. When my render calls a slot, say Screen_Avalable, that is in my main window object in the main thread, does this slot/method get processed in my worker thread or the main thread?


It gets processed in the main thread by default, but see this guide for more information.


It gets processed on the main thread.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜