Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/pyqt-rounded-corners-lineedit
PyQt QLineEdit with rounded corners
https://github.com/yjg30737/pyqt-rounded-corners-lineedit
pyqt pyqt-tutorial pyqt5 pyqt5-examples python python3 python37 qlineedit qt
Last synced: about 2 months ago
JSON representation
PyQt QLineEdit with rounded corners
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-rounded-corners-lineedit
- Owner: yjg30737
- License: mit
- Created: 2022-04-21T12:46:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-13T23:58:53.000Z (almost 3 years ago)
- Last Synced: 2024-12-27T05:30:12.962Z (about 2 months ago)
- Topics: pyqt, pyqt-tutorial, pyqt5, pyqt5-examples, python, python3, python37, qlineedit, qt
- Language: Python
- Homepage:
- Size: 19.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-rounded-corners-lineedit
PyQt QLineEdit with rounded corners## Requirements
* PyQt5 >= 5.8## Install
`python -m pip install pyqt-rounded-corners-lineedit`## Included Packages
* absresgetter - To get absolute path of resource file## Detailed Description
Rounded corners, borderless line edit.If you want to add the border, add code like below.
`lineEdit.setStyleSheet(lineEdit.styleSheet() + 'QLineEdit { border: 1px solid black; }')`
## Example
Code Sample
```python
from PyQt5.QtWidgets import QApplication, QGridLayout, QWidget
from pyqt_rounded_corners_lineedit import RoundedCornersLineEditclass Widget(QWidget):
def __init__(self):
super().__init__()
self.__initUi()def __initUi(self):
lineEdit = RoundedCornersLineEdit()
# if you want to set the border
# lineEdit.setStyleSheet(lineEdit.styleSheet() + 'QLineEdit { border: 1px solid black; }')
lay = QGridLayout()
lay.addWidget(lineEdit)
self.setLayout(lay)if __name__ == "__main__":
import sysapp = QApplication(sys.argv)
widget = Widget()
widget.show()
app.exec_()
```## Result
