Skip to main content

PyQt QListWidget for checkable items

Project description

pyqt-checkbox-list-widget

PyQt QListWidget for checkable items

Requirements

PyQt5 >= 5.8

Setup

python -m pip install pyqt-checkbox-list-widget

Included Packages

Example

from PyQt5.QtWidgets import QCheckBox, QVBoxLayout, QWidget, QApplication

from pyqt_checkbox_list_widget.checkBoxListWidget import CheckBoxListWidget





class Widget(QWidget):

    def __init__(self):

        super().__init__()

        self.__initUi()



    def __initUi(self):

        allCheckBox = QCheckBox('Check all')

        checkBoxListWidget = CheckBoxListWidget()

        checkBoxListWidget.addItems(['a', 'b', 'c', 'd'])



        allCheckBox.stateChanged.connect(checkBoxListWidget.toggleState)



        lay = QVBoxLayout()

        lay.addWidget(allCheckBox)

        lay.addWidget(checkBoxListWidget)



        self.setLayout(lay)





if __name__ == "__main__":

    import sys



    app = QApplication(sys.argv)

    widget = Widget()

    widget.show()

    app.exec_()

Result

https://user-images.githubusercontent.com/55078043/145694178-9d583318-2533-43fd-bbc1-71c85444a953.mp4

Similar package

pyqt-checkbox-table-widget

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-checkbox-list-widget-0.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pyqt-checkbox-list-widget-0.0.1.tar.gz.

File metadata

File hashes

Hashes for pyqt-checkbox-list-widget-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6910506196093697d7b439498250cde4e33f0508a6d62d19d29c18e9c4d2a18b
MD5 224e3291b571e506c93551b3b011773d
BLAKE2b-256 b0cb0b7be3d55e12917339c6b61540275d70c0dd6346117282f32c0f4c02c95f

See more details on using hashes here.

File details

Details for the file pyqt_checkbox_list_widget-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyqt_checkbox_list_widget-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f48ed53d23bd40e6edc0b1bdb64a3e2b0b2e62fabe830869d2a0060810e82149
MD5 854e183924f197460cb508324f34846f
BLAKE2b-256 f7b5bc7da927f861dfdf85eb316452421ec684d23dd70bee3715409bab8af476

See more details on using hashes here.

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