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

QWidget has a repaint() method that might be useful to you.

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

QQuickWindow has signals for before and after rendering, maybe you can find the 
global event for that signal and process your camera input after.

I don't know much about your third question but from what I understand about 
your use case, perhaps openFrameworks might be a better option for you. The 
framework has many helper functions to help with projection and off screen 
rendering, which might be useful to you, and multithreaded drawing.

Regards,
Furkan Üzümcü
On Jun 25, 2018, 08:30 -0400, Lodron, Gerald <[email protected]>, wrote:
> 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
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to