PDA

View Full Version : Split view for two images with the images beeing fixed and occupying the same space



MustafaArikan
17th February 2016, 14:53
Is it possible in Qt using QSplitter and QGraphicsview achieve something like that.
I mean two images should be shown but a slider which shows only one image.
I need to compare images with the same dimensions.

I tried to do it with QSplitter but if I move the slider the images within QGraphicsView are moved as well.
Something like this: https://www.mapbox.com/blog/compare-styles-in-mapbox-studio/

I think it would be really if this is possible

anda_skoa
17th February 2016, 15:44
That's really not what a splitter is for, it separates widgets.

What you could try is to create the slider as a graphics item on top of your custom item and update the threshold value in that item when the slider moves.

Or implementing a custom widget that draws the content and the slider

Cheers,
_