Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/pyqt-splitted-graphicsview
QGraphicsView which shows clipped left image and clipped right image at the same place based on movable vertical line
https://github.com/yjg30737/pyqt-splitted-graphicsview
pyqt5 pyqt5-examples qgraphicsellipseitem qgraphicslineitem qgraphicspixmapitem qgraphicsscene qgraphicsview
Last synced: 5 days ago
JSON representation
QGraphicsView which shows clipped left image and clipped right image at the same place based on movable vertical line
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-splitted-graphicsview
- Owner: yjg30737
- License: mit
- Created: 2023-11-20T00:12:29.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-12T00:40:02.000Z (11 months ago)
- Last Synced: 2024-01-26T10:10:13.966Z (10 months ago)
- Topics: pyqt5, pyqt5-examples, qgraphicsellipseitem, qgraphicslineitem, qgraphicspixmapitem, qgraphicsscene, qgraphicsview
- Language: Python
- Homepage:
- Size: 1.57 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/yjg30737/pyqt-splitted-graphicsview/assets/55078043/42363867-02a0-4a46-a8a1-f4ef8343727c)Set the image files for each part (left and right) and observe what happens when you move the vertical line left and right.
https://github.com/yjg30737/pyqt-splitted-graphicsview/assets/55078043/0da48979-85e3-4e68-95e4-57395ee7393a
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.