PDA

View Full Version : updating label from worker thread



prkhr4u
9th November 2013, 04:41
I am having a multithreaded application.In one of the thread,I am doing some processing and after the processing I want to display a image.
I want to update the image after the processing.
I want to do something like this


ui->label->setPixmap(QPixmap("abc.bmp"));

But I am unable to access ui->label from the worker thread.
Pl tell how to do this??

prkhr4u
9th November 2013, 09:41
I have done the work using signal and slot mechanism,Its the only possible way to do it.

toufic.dbouk
9th November 2013, 11:09
True, Signals and Slots is a good approach in your case.

Good Luck.