Skip to main content

Waiting spinner for PyQt6

Project description

QtWaitingSpinner

PyPI version

QtWaitingSpinner is a highly configurable, custom Qt widget for showing "waiting" or "loading" spinner icons in Qt applications, e.g. the spinners below are all QtWaitingSpinner widgets differing only in their configuration:

waiting spinner

The widget is pretty customizable:

examples

Installation

pip install pyqtspinner

Configuration

The following properties can all be controlled directly through their corresponding setters:

  • Color of the widget
  • "Roundness" of the lines
  • Speed (rotations per second)
  • Number of lines to be drawn
  • Line length
  • Line width
  • Radius of the spinner's "dead space" or inner circle
  • The percentage fade of the "trail"
  • The minimum opacity of the "trail"

Usage

You can easily adjust spinner settings by running:

poetry run conf

configuration

Make the spinner you would like and press "show init args" button. It will generate the code snippet which is almost ready-to-use:

WaitingSpinner(
    parent,
    roundness=100.0,
    opacity=3.141592653589793,
    fade=80.0,
    radius=10,
    lines=20,
    line_length=10,
    line_width=2,
    speed=1.5707963267948966,
    color=(0, 0, 0)
)

As an alternative example, the code below will create a spinner that (1) blocks all user input to the main application for as long as the spinner is active, (2) automatically centers itself on its parent widget every time "start" is called and (3) makes use of the default shape, size and color settings.

spinner = QtWaitingSpinner(self, True, True, Qt.ApplicationModal)
spinner.start() # starts spinning

Enjoy!

Thanks:

to @z3ntu for the groundwork. to @snowwlex for the widget itself.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqt6spinner-2.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyqt6spinner-2.0.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file pyqt6spinner-2.0.0.tar.gz.

File metadata

  • Download URL: pyqt6spinner-2.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Windows/11

File hashes

Hashes for pyqt6spinner-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b50ef484e8bd689883b2ca65e7b6ac4209c918d2bdedaca757c5a48617f8c4d2
MD5 e479bfd69217c5f677640373c36781e8
BLAKE2b-256 3451f39f2b58b0d2104cfd08f026e588a5624aa56198775ececcaa43dd0f6662

See more details on using hashes here.

File details

Details for the file pyqt6spinner-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyqt6spinner-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Windows/11

File hashes

Hashes for pyqt6spinner-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56500c8eda5670f810aa6754769c713eb017e074dcb530eb24a57e33716f21d5
MD5 fc16a353540c35acbd9e364d6e91c35b
BLAKE2b-256 e6c02f3f97187f183db1732d9661172ae42a97edd8f0b15849b9c8d8b2abaa1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page