{"id":17477710,"url":"https://github.com/yjg30737/pyqt-style-setter","last_synced_at":"2025-04-10T09:26:55.860Z","repository":{"id":44666257,"uuid":"465115751","full_name":"yjg30737/pyqt-style-setter","owner":"yjg30737","description":"PyQt style setter","archived":false,"fork":false,"pushed_at":"2022-07-11T22:48:16.000Z","size":37,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-26T00:42:13.159Z","etag":null,"topics":["pyqt","pyqt5","python","python3","python37"],"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/yjg30737.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}},"created_at":"2022-03-02T01:32:38.000Z","updated_at":"2023-02-14T22:02:43.000Z","dependencies_parsed_at":"2022-09-15T09:52:16.719Z","dependency_job_id":null,"html_url":"https://github.com/yjg30737/pyqt-style-setter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-style-setter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-style-setter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-style-setter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-style-setter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yjg30737","download_url":"https://codeload.github.com/yjg30737/pyqt-style-setter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248071589,"owners_count":21043056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","python37"],"created_at":"2024-10-18T20:09:08.936Z","updated_at":"2025-04-10T09:26:55.837Z","avatar_url":"https://github.com/yjg30737.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyqt-style-setter\nPyQt style setter\n\n## Note\nCurrently the only style you can set is dark-gray(\u003ca href=\"https://github.com/yjg30737/pyqt-dark-gray-theme.git\"\u003epyqt-dark-gray-theme\u003c/a\u003e), light-gray(\u003ca href=\"https://github.com/yjg30737/pyqt-light-gray-theme.git\"\u003epyqt-light-gray-theme\u003c/a\u003e).\n\n## Requirements\n* PyQt5 \u003e= 5.8\n\n## Setup\n`python -m pip install pyqt-style-setter`\n\n## Included Packages\n* \u003ca href=\"https://github.com/yjg30737/pyqt-dark-gray-theme.git\"\u003epyqt-dark-gray-theme\u003c/a\u003e\n* \u003ca href=\"https://github.com/yjg30737/pyqt-light-gray-theme.git\"\u003epyqt-light-gray-theme\u003c/a\u003e\n* \u003ca href=\"https://github.com/yjg30737/pyqt-svg-button.git\"\u003epyqt-svg-button\u003c/a\u003e - To exclude svg icon set button, also known as `SvgButton`. It should use its own style or else svg icon will be disappeared by overwritten style. \n\n## Usage\n* `StyleSetter.setWindowStyle(main_window: QWidget, theme: str = 'dark', exclude_type_lst: list = [])` - `main_window` is the widget which user want to set the style. `exclude_type_lst`'s items are excluded from applying style. Item type should be `type`(ex. `QAbstractButton`). Currently it only works for `QAbstractButton`.\n\n## Example\n※ I use the \u003ca href=\"https://github.com/yjg30737/pyqt-timer.git\"\u003epyqt-timer\u003c/a\u003e's settings dialog as an example. \n\n### PyQt default theme\n\n```python\nfrom PyQt5.QtWidgets import QApplication\nfrom pyqt_timer.settingsDialog import SettingsDialog\n\nif __name__ == \"__main__\":\n    import sys\n\n    app = QApplication(sys.argv)\n    window = SettingsDialog()\n    window.show()\n    app.exec_()\n```\n\n![image](https://user-images.githubusercontent.com/55078043/167977357-9398f798-0088-47c5-af80-159c6fb1831b.png)\n\n### Dark-gray theme\n\n```python\nfrom PyQt5.QtWidgets import QApplication\nfrom pyqt_style_setter import StyleSetter\nfrom pyqt_timer.settingsDialog import SettingsDialog\n\nif __name__ == \"__main__\":\n    import sys\n\n    app = QApplication(sys.argv)\n    window = SettingsDialog()\n    StyleSetter.setWindowStyle(window) # add this\n    window.show()\n    app.exec_()\n```\n\n![image](https://user-images.githubusercontent.com/55078043/167977474-81411648-de15-45e9-91cd-8f83ea3e863d.png)\n\n### Using this with \u003ca href=\"https://github.com/yjg30737/pyqt-custom-titlebar-setter.git\"\u003epyqt-custom-titlebar-setter\u003c/a\u003e\n\n```python\nfrom PyQt5.QtWidgets import QApplication\nfrom pyqt_custom_titlebar_setter import CustomTitlebarSetter\nfrom pyqt_style_setter import StyleSetter\nfrom pyqt_timer.settingsDialog import SettingsDialog\n\nif __name__ == \"__main__\":\n    import sys\n\n    app = QApplication(sys.argv)\n    dialog = SettingsDialog()\n    StyleSetter.setWindowStyle(dialog)\n    titleBarWindow = CustomTitlebarSetter.getCustomTitleBarWindow(dialog, icon_filename='settings.svg')\n    titleBarWindow.show()\n    app.exec_()\n```\n\n![image](https://user-images.githubusercontent.com/55078043/169630980-aee1c358-59f3-4761-8c80-d2f04df4baef.png)\n\nFor those who use macOS\n\n![image](https://user-images.githubusercontent.com/55078043/169631123-bc38a3f3-4fb8-4552-99ee-0d6af529c157.png)\n\n## See Also\n* \u003ca href=\"https://github.com/yjg30737/qtsasstheme.git\"\u003eqtsasstheme\u003c/a\u003e - using sass to set qt theme, bit more harder but far more flexible\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjg30737%2Fpyqt-style-setter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyjg30737%2Fpyqt-style-setter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjg30737%2Fpyqt-style-setter/lists"}