# How to sent image of the child thread to the main thread for display in Qt

**URL:** <https://forum.opencv.org/t/how-to-sent-image-of-the-child-thread-to-the-main-thread-for-display-in-qt/6997>\
**Category:** C++\
**Tags:** qt, videoio, core\
**Created:** [January 6, 2022, 5:29am UTC](https://forum.opencv.org/t/how-to-sent-image-of-the-child-thread-to-the-main-thread-for-display-in-qt/6997 "2022-01-06T05:29:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lee\_0111](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/lee_0111/32/3947_2.png) [@lee\_0111](https://forum.opencv.org/u/lee_0111)\
**Post date:** [January 6, 2022, 5:29am UTC](https://forum.opencv.org/t/how-to-sent-image-of-the-child-thread-to-the-main-thread-for-display-in-qt/6997/1 "2022-01-06T05:29:06Z")

</div>

I use opencv 4.5.4 to process images in child thread and then sent images to main thread for display on qlabel.These images are captured from a network camera.Now I use signals and slots method of Qt to transfer these images ,but it’s too slow and the program interface is not smooth.Is there a better way?

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [January 6, 2022, 11:18am UTC](https://forum.opencv.org/t/how-to-sent-image-of-the-child-thread-to-the-main-thread-for-display-in-qt/6997/2 "2022-01-06T11:18:39Z")

</div>

> [@lee\_0111](#):
>
> Now I use signals and slots method of Qt to transfer these images

unlikely, that this is the bottleneck

please show, what you are doing, and start profiling your code,  
using `cv::getTickCount` or some monotone clock from `std::chrono`

---

<div class="post-metadata">

**Author:** ![cudawarped](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cudawarped](https://forum.opencv.org/u/cudawarped)\
**Post date:** [January 7, 2022, 11:12am UTC](https://forum.opencv.org/t/how-to-sent-image-of-the-child-thread-to-the-main-thread-for-display-in-qt/6997/3 "2022-01-07T11:12:19Z")

</div>

I agree with berak, because I use this method myself without any issues, maybe you cannot capture and decode the images quickly enough in your capture thread? If this is not the case I would try the code in this [answer](https://stackoverflow.com/a/21253353) which worked as a starting point for me when streaming from multiple (\>10) ip camera’s at once.
