{"id":7649,"library":"qdarkstyle","title":"QDarkStyleSheet","description":"QDarkStyleSheet (qdarkstyle) provides a comprehensive dark and light stylesheet for C++/Python Qt applications. It offers a consistent, modern theme for your GUI, compatible with both PyQt5 and PySide2. The current version is 3.2.3, and it receives regular minor updates with occasional major releases for significant structural changes and new features.","status":"active","version":"3.2.3","language":"python","source_language":"en","source_url":"https://github.com/ColinDuquesnoy/QDarkStyleSheet","tags":["qt","gui","stylesheet","dark-mode","pyside","pyqt","theming"],"install":[{"cmd":"pip install qdarkstyle","lang":"bash","label":"Install qdarkstyle"}],"dependencies":[],"imports":[{"wrong":"import qdarkstyle\napp.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())","symbol":"load_stylesheet_pyqt5","correct":"from qdarkstyle import load_stylesheet_pyqt5"}],"quickstart":{"code":"import sys\nfrom PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton, QVBoxLayout, QWidget\nfrom PyQt5.QtCore import Qt\n\nimport qdarkstyle\n\ndef main():\n    app = QApplication(sys.argv)\n\n    # Apply the dark stylesheet for PyQt5\n    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())\n    # For PySide2, use:\n    # app.setStyleSheet(qdarkstyle.load_stylesheet_pyside2())\n\n    # Create a simple main window\n    main_window = QMainWindow()\n    main_window.setWindowTitle(\"QDarkStyle Demo\")\n    main_window.setGeometry(100, 100, 400, 200)\n\n    central_widget = QWidget()\n    main_window.setCentralWidget(central_widget)\n    layout = QVBoxLayout(central_widget)\n\n    button = QPushButton(\"Styled Button\", main_window)\n    layout.addWidget(button, alignment=Qt.AlignCenter)\n\n    main_window.show()\n    sys.exit(app.exec_())\n\nif __name__ == \"__main__\":\n    main()","lang":"python","description":"This quickstart demonstrates how to initialize a PyQt5 application and apply the QDarkStyleSheet. Ensure you have PyQt5 (or PySide2) installed alongside qdarkstyle. The example creates a simple window with a button to showcase the applied theme."},"warnings":[{"fix":"Ensure your project uses Python 3.6+ and Qt5 (PyQt5 or PySide2).","message":"QDarkStyleSheet dropped support for Python 2 and Qt4. Attempting to use it with these older versions will result in errors or unexpected behavior.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Refer to the official GitHub repository's `example` folder and release notes for `v3.0.0` to understand the new structure and usage patterns. Most common usage (`app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())`) remains compatible.","message":"Version 3.0.0 introduced a new internal structure, improved dark and new light palettes. If you were relying on deeply integrated custom styling or internal API calls prior to 3.0.0, you might need to adapt your code.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Install your preferred Qt binding: `pip install PyQt5` or `pip install PySide2`.","message":"QDarkStyleSheet provides stylesheets but does not install Qt bindings (PyQt5 or PySide2) itself. You must explicitly install one of these bindings for `qdarkstyle` to function.","severity":"gotcha","affected_versions":"*"},{"fix":"If using PyQt5, call `qdarkstyle.load_stylesheet_pyqt5()`. If using PySide2, call `qdarkstyle.load_stylesheet_pyside2()`.","message":"Ensure you are using the correct `load_stylesheet_pyqt5()` or `load_stylesheet_pyside2()` function that matches your installed Qt binding.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'/python':13 '3.2.3':35 'applic':15 'c':12 'chang':49 'compat':25 'comprehens':6 'consist':19 'current':32 'dark':7,57 'dark-mod':56 'featur':52 'gui':24,54 'light':9 'major':44 'minor':40 'mode':58 'modern':20 'new':51 'occasion':43 'offer':17 'provid':4 'pyqt':60 'pyqt5':28 'pysid':59 'pyside2':30 'qdarkstyl':3 'qdarkstylesheet':1,2 'qt':14,53 'receiv':38 'regular':39 'releas':45 'signific':47 'structur':48 'stylesheet':10,55 'theme':21,61 'updat':41 'version':33","created_at":"2026-04-16T14:07:26.193174+00:00","updated_at":"2026-04-16T14:07:26.193174+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.2.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ColinDuquesnoy/QDarkStyleSheet","docs":"https://qdarkstylesheet.readthedocs.io/en/stable","changelog":null,"pypi":"https://pypi.org/project/qdarkstyle/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}