Is it possible integrate holoviz with QT GUI in Python?
Background: I want to port a python application into Holoscan framework, the application shows some buttons with an video panel in same window, the video panel shows the frames from video and the result of inference on this video, and the buttons provide the callbacks according to the user actions.
I learn the application florence-2-vision from the holohub, it seems this application achieves my goal, but by this application, the video and buttons are shown in 2 separate windows, this is not my expectation, is it possible to integrate these 2 windows into one window? how to do this if it is possible?
Best Regards,
George
Hi George,
we currently don’t have an example which is integrating a video stream into a Python QT application. There is a Holohub example using C++ Qt Video Replayer (latest) - Holoscan Reference Applications.
Best Regards,
Andreas
Thanks Andreas, we learn the sample Qt Video Replayer, but the fact is, our app is coded by python now, if we move to c/c++, we have rewritten the app in c/c++, we have to consider the work and time cost on implementing the app in c/c++.
Is it possible to implement an app with GUI which integrating a video stream into a Python QT application? How to do this if it is possible?
Thanks,
George
Hi George,
You could use a QImage and a QPixmap to display the image data received. It’s not very efficient since the data has to be copied from GPU memory to CPU memory but it should work.
The QT Video Replayer is directly rendering to a QT Widget using OpenGL and data stays on GPU. This is fast, but it is possible with C++ only.
Regards,
Andreas