Question

I have a lot of 2D, time-variant data (aka a movie) that I'd like to visualise inside a Qt interface. The idea is that the results can be viewed as a movie, browsed using a time-slider and then individual data points should be selectable to get more information about that point. (The data being shown is generated from simulations, and then converted to RGB through some colormap, so I'm not really looking for a component that plays mp4)

I have some experience using a QGraphicsScene, which makes it easy to get the cursor location & react to mouse events. But is it suitable for video? Or am I better off with some kind of QImage directly on a widget?

Was it helpful?

Solution

Ok, so it works well in PyQt, not so well in PySide.

I'm using a QPixmap wrapped in a QPixmapItem that gets added to the scene. To update the frame, I change the contents of the pixmap object and call update() on the scene.

Performance is good enough for video (although I don't need high frame rates for this project).

In PySide I ran into weird issues when I used more than 1 pixmap item, in PyQt it works just fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top