---
name: "qdarkstyle.example"
section: "1"
platform: "linux"
package: "python3-qdarkstyle"
version: "3.2.3+ds1-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/qdarkstyle.example"
---

# qdarkstyle.example(1)

qdarkstyle example gui program

## NAME

qdarkstyle.example - qdarkstyle example gui program

## DESCRIPTION

usage: qdarkstyle.example \[-h\] \[--palette {dark,light,none}\]

- \[--qt\_from {pyqt5,pyqt6,pyside2,pyside6,qtpy,pyqtgraph}\]

  \[--test\] \[--screenshots\] \[--offscreen\] \[--reset\]

Example of qdarkstyle use for Python and Qt applications.

This module a main window with every item that could be created with Qt Design (common ones) in the basic states (enabled/disabled), and (checked/unchecked) for those who has this attribute.

Requirements:

-

  \- Python 3 - QtPy - PyQt5 or PyQt6 or PySide2 or PySide6 - PyQtGraph (if chosen)

To run this example using PyQt5, simple do

.. code-block:: python

-

  python example.py

or

.. code-block:: python

- python example.py

  **--qt\_from**=*pyqt5*

Other options for qt\_from are: pyqt5, pyqt6, pyside2, pyside6, qtpy, pyqtgraph. Also, you can run the example without any theme (none), to check for problems.

.. code-block:: python

- python example.py

  **--qt\_from**=*pyqt5* **--palette**=*none*

### Note:

-

  qdarkstyle does not have to be installed to run the example.

### optional arguments:

- **-h**, **--help**

  show this help message and exit

- **--palette** {dark,light,none}

  Palette to display. Using 'none' there is no style sheet applied, OS like.

- **--qt\_from** {pyqt5,pyqt6,pyside2,pyside6,qtpy,pyqtgraph}

  Choose which binding and/or abstraction is to be used to run the example. Default is 'qtpy'

- **--test**

  Auto close window after 2s.

- **--screenshots**

  Generate screenshots on images folder.

- **--offscreen**

  Do not try to show the screen (running on server).

- **--reset**

  Reset GUI settings (position, size) then opens.
