aqt.switch
==========

.. py:module:: aqt.switch


Classes
-------

.. autoapisummary::

   aqt.switch.Switch


Module Contents
---------------

.. py:class:: Switch(radius: int = 10, left_label: str = '', right_label: str = '', left_color: dict[str, str] | None = None, right_color: dict[str, str] | None = None, parent: QWidget | None = None)

   Bases: :py:obj:`QAbstractButton`


   A horizontal slider to toggle between two states which can be denoted by strings and/or QIcons.

   The left state is the default and corresponds to isChecked()=False.
   The suppoorted slots are toggle(), for an animated transition, and setChecked().


   .. py:method:: position() -> int


   .. py:property:: start_position
      :type: int



   .. py:property:: end_position
      :type: int



   .. py:property:: label
      :type: str



   .. py:property:: path_color
      :type: QColor



   .. py:property:: label_width
      :type: int



   .. py:method:: width() -> int


   .. py:method:: height() -> int


   .. py:method:: sizeHint() -> QSize


   .. py:method:: setChecked(checked: bool) -> None


   .. py:method:: paintEvent(_event: QPaintEvent | None) -> None


   .. py:method:: mouseReleaseEvent(event: QMouseEvent | None) -> None


   .. py:method:: enterEvent(event: QEnterEvent | None) -> None


   .. py:method:: toggle() -> None


