Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/pyqt-vbounding-box
PyQt QGraphicsView with bounding box. User can move horizontal border of the box vertically.
https://github.com/yjg30737/pyqt-vbounding-box
pyqt pyqt-examples pyqt-tutorial pyqt5 pyqt5-examples python python3 python37 qgraphicsitem qgraphicsscene qgraphicsview qpen qt selection-box
Last synced: 6 days ago
JSON representation
PyQt QGraphicsView with bounding box. User can move horizontal border of the box vertically.
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-vbounding-box
- Owner: yjg30737
- License: mit
- Created: 2022-03-11T00:11:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-15T00:00:27.000Z (over 2 years ago)
- Last Synced: 2024-10-11T09:28:55.225Z (3 months ago)
- Topics: pyqt, pyqt-examples, pyqt-tutorial, pyqt5, pyqt5-examples, python, python3, python37, qgraphicsitem, qgraphicsscene, qgraphicsview, qpen, qt, selection-box
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-vbounding-box
PyQt QGraphicsView with bounding box. User can move horizontal border of the box vertically.## Requirements
* PyQt5 >= 5.8## Setup
`python -m pip install pyqt-vbounding-box`## Feature
* Being able to drag and drop horizontal border vertically
* Pressing mouse cursor to place more adjacent border on the spot.
* Right click to release the focus of the box## Example
Code Sample```python
from PyQt5.QtWidgets import QWidget, QGridLayout, QApplication, QPushButton, QFileDialogfrom pyqt_vbounding_box.vBoundingBox import VBoundingBox
class VBoundingBoxExample(QWidget):
def __init__(self):
super().__init__()
self.__initUi()def __initUi(self):
addImageBtn = QPushButton('Add image')
addImageBtn.clicked.connect(self.__addImage)
self.__view = VBoundingBox()lay = QGridLayout()
lay.addWidget(addImageBtn)
lay.addWidget(self.__view)self.setLayout(lay)
def __addImage(self):
filename = QFileDialog.getOpenFileName(self, 'Open', '', 'Image Files (*.png *.jpg *.bmp)')
if filename[0]:
filename = filename[0]
self.__view.setFile(filename)if __name__ == "__main__":
import sysapp = QApplication(sys.argv)
ex = VBoundingBoxExample()
ex.show()
sys.exit(app.exec_())
```Result
https://user-images.githubusercontent.com/55078043/157777737-a801f085-936e-4f08-95bc-9ae51313454a.mp4
## See Also
* pyqt-hbounding-box - horizontal way
* pyqt-bounding-box - horizontal/vertical ways