Skip to content

QGraphicsView which shows clipped left image and clipped right image at the same place based on movable vertical line

License

Notifications You must be signed in to change notification settings

yjg30737/pyqt-splitted-graphicsview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyqt-splitted-graphicsview

QGraphicsView which shows clipped left image and clipped right image at the same place based on movable vertical line.

This widget is suitable for displaying images before and after processing.

The QGraphicsScene in this view is resized based on the size of the image that was added, according to the specific purpose of this script.

Requirements

  • PyQt5 >= 5.14

Class & Method Overview

  • SplittedImageView - class in the imageView.py
    • setFilenameToLeft(filename) - set the image file on the left
    • setFilenameToRight(filename) - set the image file on the right
    • removeItemOnTheLeft() - remove the image on the left if it exists
    • removeItemOnTheRight() - remove the image on the right if it exists

Example Code

Refer to the main.py to understand how to use it.

How to Use

image

Set the image files for each part (left and right) and observe what happens when you move the vertical line left and right.

PyQt.Splitted.Graphics.View.Example.2023-11-20.09-17-18.mp4

Left part is a (1).png, right part is a (2).png. These files are in the repo, so you can use them to test this script, right away.

About

QGraphicsView which shows clipped left image and clipped right image at the same place based on movable vertical line

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages