Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/pyqt-color-button
Circle-shaped color button
https://github.com/yjg30737/pyqt-color-button
gui pyqt pyqt-examples pyqt-tutorial pyqt5 pyqt5-circule-button pyqt5-examples pyqt5-tutorial python python3 python37 qcolor qpushbutton qt
Last synced: 16 days ago
JSON representation
Circle-shaped color button
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-color-button
- Owner: yjg30737
- License: mit
- Created: 2021-11-22T06:42:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-13T22:16:53.000Z (over 2 years ago)
- Last Synced: 2024-09-09T11:04:17.835Z (3 months ago)
- Topics: gui, pyqt, pyqt-examples, pyqt-tutorial, pyqt5, pyqt5-circule-button, pyqt5-examples, pyqt5-tutorial, python, python3, python37, qcolor, qpushbutton, qt
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-color-button
Circle-shaped color button## Requirements
* PyQt5 >= 5.8## Setup
`python -m pip install pyqt-color-button`## Class and Method Overview
Constructor - `ColorButton(size=20, r=255, g=255, b=255)`
You can make a new instance of ColorButton like below.
`btn = ColorButton(size=40, r=0, g=0, b=0)`
Size argument is value(px) of border-radius, color is value of background-color.
With `setColor(rgb: tuple)` or `setColor(rgb: QColor)`, you can set the color after you made a new instance.
`getColor()` let you get the current color of the box.
There is `colorChanged(QColor)` signal to detect the color of box changed.
## Preview
![image](https://user-images.githubusercontent.com/55078043/160053919-29dc6e08-4709-4d5e-8f6d-74a20f365357.png)