Hi

I am using a display as a projector for a camera/projector setup. Here i want 
to display an Image using qt, trigger my cameras (so cameras do NOT coninously 
grab) and view the reflection of the display on a mirror like surface.


I am using a QLabel with a setPixmap call from an qimage. in sum i have 12 
different qimages in memory. To control my display i programmed a seperate 
thread which polls over an external signal (IP port). when i get those signal 
(in different thread as the GUI main thread) the thread calls the setPixmap 
function and then returns. After that my cameras get triggered (from the 
program wich sends the extern signal) and the images from the cameras are 
stored/processed somehow.


The problem is that my cameras sometimes record the old pixmap, so for me it 
seems that the setPixmap do not immideately performs a repaint action of the 
qwidget. I think that the repaint event must be triggered from the main gui 
thread at some time because when i put a sleep of several hundret milliseconds 
after setPixmap and before trigger cameras it works. I also tested using a 
update call, without effect. And it seems that i am not allowed to call repaint 
from my seperate thread because then the qlabel looks really strange.... I dont 
like to sleep so long because my cameras can make 30 frames per second which i 
want to use, so i twould be great if i could force a qlabel update with 30Hz 
somehow....


So my question:

-> is it possible to perform a fast repaint action? Do i need to swich my 
command polling thread to main thread for this?

-> can i get a kind of response/signal when the repaint is finished so that i 
can immedialtely trigger the cameras?

-> can someone explain me the timing and order/process of repaint(ing)


Or shouldn't i use qt for this, which also would be an answer....


thanks,

Gerald Lodron


_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to