{"id":47681740,"url":"https://github.com/prx001/qswitchcontrol","last_synced_at":"2026-04-02T14:01:47.708Z","repository":{"id":47573647,"uuid":"390352109","full_name":"Prx001/QSwitchControl","owner":"Prx001","description":"An easy-to-use and modern toggle switch for Qt Python binding PyQt (PyQt5) :package:","archived":false,"fork":false,"pushed_at":"2024-08-05T20:54:15.000Z","size":95,"stargazers_count":21,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-05T10:36:01.316Z","etag":null,"topics":["pyqt","pyqt5","python","python3","qt","qt5","qt5-custom-widgets","switch","switch-button","toggle","toggle-button","toggle-buttons","toggle-switch","ui-components"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Prx001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-28T12:59:38.000Z","updated_at":"2025-12-19T03:50:01.000Z","dependencies_parsed_at":"2024-11-15T14:05:46.299Z","dependency_job_id":"e9257832-fada-45f4-b910-c0372cfe1ed2","html_url":"https://github.com/Prx001/QSwitchControl","commit_stats":{"total_commits":52,"total_committers":1,"mean_commits":52.0,"dds":0.0,"last_synced_commit":"7e752d0e5ee5e0a38965195fa83de210d05c1957"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Prx001/QSwitchControl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prx001%2FQSwitchControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prx001%2FQSwitchControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prx001%2FQSwitchControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prx001%2FQSwitchControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prx001","download_url":"https://codeload.github.com/Prx001/QSwitchControl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prx001%2FQSwitchControl/sbom","scorecard":{"id":114811,"data":{"date":"2025-08-11","repo":{"name":"github.com/Prx001/QSwitchControl","commit":"7e752d0e5ee5e0a38965195fa83de210d05c1957"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/Prx001/QSwitchControl/python-package.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/Prx001/QSwitchControl/python-package.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/Prx001/QSwitchControl/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/Prx001/QSwitchControl/python-publish.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.yml:1","Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.0.3 not signed: https://api.github.com/repos/Prx001/QSwitchControl/releases/48340851","Warn: release artifact v1.0.4 not signed: https://api.github.com/repos/Prx001/QSwitchControl/releases/47681626","Warn: release artifact v2.0.3 does not have provenance: https://api.github.com/repos/Prx001/QSwitchControl/releases/48340851","Warn: release artifact v1.0.4 does not have provenance: https://api.github.com/repos/Prx001/QSwitchControl/releases/47681626"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T00:52:54.371Z","repository_id":47573647,"created_at":"2025-08-16T00:52:54.371Z","updated_at":"2025-08-16T00:52:54.371Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pyqt","pyqt5","python","python3","qt","qt5","qt5-custom-widgets","switch","switch-button","toggle","toggle-button","toggle-buttons","toggle-switch","ui-components"],"created_at":"2026-04-02T14:01:25.252Z","updated_at":"2026-04-02T14:01:47.681Z","avatar_url":"https://github.com/Prx001.png","language":"Python","readme":"# QSwitchControl\n## Custom toggle-switch widget implemented in PyQt5 for PyQt5 applications!\n[![CodeFactor](https://www.codefactor.io/repository/github/prx001/qswitchcontrol/badge)](https://www.codefactor.io/repository/github/prx001/qswitchcontrol)\n\n\nhttps://user-images.githubusercontent.com/67240789/128912103-b24d7321-a7d6-4b1b-bbdc-562dbd20b358.mp4\n\n\n\n### An easy-to-use and modern toggle switch for Qt Python binding PyQt\nQSwitchControl is a custom toggle-switch widget inherited from 'QCheckBox' class, and acts as a checkbox alternative widget in your PyQt5 application.\n\n## How to use?\n### Installation\nThe package is available on [PyPi](https://pypi.org) so as always use pip for installation:\n```\npip install QSwitchControl\n```\n\n### Usage in your Python application\nFirst of all, as expected, you need to import the package.\nImport 'SwitchControl' class from the package:\n```python\nfrom QSwitchControl import SwitchControl\n```\nNow the class is ready to use!\nSwitchControl is an alternative widget for QCheckBox from Qt framework, same methods, same usage and that's how it works.\nThere are things you can define for your SwitchControl, like the circle color, background color, active color, animation easing curve, animation duration and some other things, but you can use default values. The package contains a '__main__' script so you can test the widget easily:\n```\npython -m QSwitchControl\n```\nBellow is the '__main__' script:\n```python\nimport sys\n\nfrom PyQt5.QtCore import Qt\nfrom PyQt5.QtWidgets import QApplication, QWidget, QHBoxLayout\n\nfrom QSwitchControl import SwitchControl\n\n\nclass Form(QWidget):\n\tdef __init__(self):\n\t\tsuper().__init__()\n\t\tself.initUI()\n\n\tdef initUI(self):\n\t\tself.resize(400, 400)\n\t\tself.setWindowTitle(\"SwitchControl test\")\n\t\tself.setStyleSheet(\"\"\"\n\t\tbackground-color: #222222;\n\t\t\"\"\")\n\t\tswitch_control = SwitchControl()\n\t\thbox = QHBoxLayout()\n\t\thbox.addWidget(switch_control, Qt.AlignCenter, Qt.AlignCenter)\n\t\tself.setLayout(hbox)\n\t\tself.show()\n\n\napp = QApplication(sys.argv)\nform = Form()\nif __name__ == '__main__':\n\tsys.exit(app.exec_())\n```\nIn this script we used the default values for our widget:\n```python\nswitch_control = SwitchControl()\n```\nYou can define the values yourself. Bellow is an example:\n```python\nswitch_control = SwitchControl(bg_color=\"#777777\", circle_color=\"#DDD\", active_color=\"#aa00ff\", animation_curve=QtCore.QEasingCurve.InOutCubic, animation_duration=300, checked=True, change_cursor=False)\n```\n# Qt Designer integration\nQt Designer is a very extensible tool, even can support your custom widgets! It means you can interact with your custom widget just as you do with Qt widgets, like QPushButton, QCheckBox, you can drag and drop them on your form, change their sizes, set properties and so on.\nQt Designer can load plugins, and you can load your custom widgets through plugins, then your custom widget is available in Qt Designer Widget Box. In C++, using Qt Creator IDE you can create your custom widgets and compile them to .dll file, then you put the dll file (your plugin) into Qt Designer's relative path for plugins, and that's it you can use your widget in Designer. But, here in python the story is a little different. PyQt supports this plugin developement and integrate *Python based* Qt custom widgets in Qt Designer. [Learn more about integrating PyQt custom widgets in Qt Designer](https://wiki.python.org/moin/PyQt/Using_Python_Custom_Widgets_in_Qt_Designer) There is the Qt Designer plugin for QSwitchControl in package, [QSwitchControlplugin.py](https://github.com/Prx001/QSwitchControl/blob/main/QSwitchControlplugin.py). You can load it to your Qt Designer.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprx001%2Fqswitchcontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprx001%2Fqswitchcontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprx001%2Fqswitchcontrol/lists"}