How to use the qdarkstyle.IMAGES_PATH function in QDarkStyle

To help you get started, we’ve selected a few QDarkStyle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ColinDuquesnoy / QDarkStyleSheet / example / example.py View on Github external
import platform
import time

# Make the example runnable without the need to install and include ui
sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + '/..'))
sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + '/ui'))

# Must be in this place, after setting path, to not need to install
import qdarkstyle  # noqa: E402

# Set log for debug
logging.basicConfig(level=logging.DEBUG)
_logger = logging.getLogger(__name__)

# Constants
SCREENSHOTS_PATH = qdarkstyle.IMAGES_PATH


def main():
    """Execute QDarkStyle example."""
    parser = argparse.ArgumentParser(description=__doc__,
                                     formatter_class=argparse.RawDescriptionHelpFormatter)
    parser.add_argument('--qt_from', default='qtpy', type=str,
                        choices=['pyqt5', 'pyqt', 'pyside2', 'pyside', 'qtpy', 'pyqtgraph', 'qt.py'],
                        help="Choose which binding and/or abstraction is to be used to run the example.")
    parser.add_argument('--no_dark', action='store_true',
                        help="Exihibts the original window (without qdarkstyle).")
    parser.add_argument('--test', action='store_true',
                        help="Auto close window after 2s.")
    parser.add_argument('--reset', action='store_true',
                        help="Reset GUI settings (position, size) then opens.")
    parser.add_argument('--screenshots', action='store_true',