Package: pyqt-darktheme
pyqt-darkthemeA dark themed QPalette class for use in GUI's implemented using PyQt5 and PyQt6, some many-used widgets that are by default clickable and decorators to change the mouse to an hourglass and back in certain circumstances.Test and examplesRun the 'test_gui.py' (for pyqt5) or 'test_gui_pyqt6.py file to see how it compares to the normal light theme and to test the library on your device.Version1.31.3.1   Only some readme edits1.3.0   Added a pyqt6 implementation, but does not automatically install either PyQt5 or PyQt6 as you can now choose between them1.21.2.5   Added a test_gui to showcase the themes and for testing1.2.4   changed elements for tabs, radio buttons, and checkboxes when they are disabled1.2.3   Changed folder name to darktheme1.11.1.1   Changed pip name to pyqt-darkthemeInstallMake sure you have PyQt5 or PyQt6 installedpip install pyqt-darkthemeHow to use the dark themeSee the 'test_gui.py' and 'test_gui_pyqt6.py' files for configuration examplesImportTo import the dark theme as a class based on QPalettePyQt5from darktheme.widget_template import DarkApplication, DarkPalettePyQt6from darktheme.widget_template_pyqt6 import DarkApplication, DarkPaletteConfigureusing DarkPaletteCreate a QApplication object and set the DarkPalette like belowapp = QApplication()
app.setPalette(DarkPalette())using DarkApplicationFor an application that is fixed in a dark theme, you can use the DarkApplication classapp = QDarkApplication()How to use the Clickable WidgetsImportTo import the clickable widgets, i.e. a clickable label widgetFor PyQt5from darktheme.widget_template import QClickLabelFor PyQt6from darktheme.widget_template_pyqt6 import QClickLabelConfigurelabel = QClickLabel()
label.setText('This label is clickable')
label.clicked.connect(clicklabel)

def clicklabel:
    print("This label is clicked")DecoratorsImportTo import the decoratorsFor PyQt5from darktheme.decorators import (
    Decorators,
    QInputDialogUserInterruption,
    QMessageBoxUserInterruption,
)For PyQt6from darktheme.decorators_pyqt6 import (
    Decorators,
    QInputDialogUserInterruption,
    QMessageBoxUserInterruption,
)How to use normal decoratorsto add a loading cursor to a called method:@Decorators.loading_cursorto revert back to normal cursor manually for some reason, i.e. to ask user for input:@Decorators.user_input_interruptionHow to use the decorated dialogsTwo dialogs are given that have the decorator 'user_input_interruption' built-in:QInputDialogUserInterruptionQMessageBoxUserInterruptionto use these dialogs:@Decorators.loading_cursor
def program():

    print(doing stuff and showing loading cursor)

    result, okPressed = QInputDialogUserInterruption.getText(
        self, "User input requested", "This dialog box shows a regular cursor, letting the user know input is requested")
    if result and okPressed:
        print(result)
    
    print(continue doing stuff and showing loading cursor)BuildPypirc fileCreate a .pypirc file in home directory[distutils]
index-servers=
    pypi
    test

[test]
repository = https://test.pypi.org/legacy/
username = __token__
password = <PyPI token>

[pypi]
repository = https://upload.pypi.org/legacy/
username = __token__
password = <PyPI token>Distributionspython3 -m pip install --upgrade build && python3 -m buildUploadpython3 -m pip install --upgrade twine && python3 -m twine upload --repository pypi dist/*LicenseLicensed under GPL-3.0-or-later, see LICENSE file for details.Copyright © 2020 Michael-Yongshi.This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with this program. If not, seehttp://www.gnu.org/licenses/.