i building gui in need update image displayed in qlabel whenever event happens.
although showing initial image in qlabel on startup works fine, whenever try change image later in event callback function, ui_.label->setpixmap(p)
fails & produces error:
qpixmap: not safe use pixmaps outside gui thread
i tried use signal-slot mechanism too:
connect(this, signal(updatepixmap(const qpixmap&)), ui_.label, slot(setpixmap(const qpixmap&)));
where updatepixmap(const qpixmap&)
signal emit in event callback function (i.e. replace ui_.label->setpixmap(p)
updatepixmap(p)
)
but still getting same error...
any idea doing wrong?
Comments
Post a Comment