Skip to main content

PyQt QLineEdit with rounded corners

Project description

pyqt-rounded-corners-lineedit

PyQt QLineEdit with rounded corners

Requirements

  • PyQt5 >= 5.8

Install

python -m pip install pyqt-rounded-corners-lineedit

Included Packages

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

from PyQt5.QtWidgets import QApplication, QGridLayout, QWidget

from pyqt_rounded_corners_lineedit import RoundedCornersLineEdit





class 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 sys



    app = QApplication(sys.argv)

    widget = Widget()

    widget.show()

    app.exec_()

Result

image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqt-rounded-corners-lineedit-0.0.11.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page