update readme

This commit is contained in:
Talley Lambert
2021-06-02 20:36:23 -04:00
parent 40b34213fb
commit 27bcfc4c8e
3 changed files with 21 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
# qwidgets
**Missing widgets for PyQt/PySide**
### Missing widgets for PyQt/PySide
[![License](https://img.shields.io/pypi/l/qwidgets.svg?color=green)](https://github.com/napari/qwidgets/raw/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/qwidgets.svg?color=green)](https://pypi.org/project/qwidgets)
@@ -9,14 +9,14 @@ Version](https://img.shields.io/pypi/pyversions/qwidgets.svg?color=green)](https
[![Test](https://github.com/napari/qwidgets/actions/workflows/test_and_deploy.yml/badge.svg)](https://github.com/napari/qwidgets/actions/workflows/test_and_deploy.yml)
[![codecov](https://codecov.io/gh/napari/qwidgets/branch/master/graph/badge.svg)](https://codecov.io/gh/napari/qwidgets)
## Widgets
Widgets include:
- Float Slider
- Range Slider (multi-handle slider)
- Labeled Sliders (sliders with linked spinboxes)
- [Float Slider](docs/sliders.md#float-slider)
- [Range Slider](docs/sliders.md#range-slider) (multi-handle slider)
- [Labeled Sliders](docs/sliders.md#labeled-sliders) (sliders with linked
spinboxes)
- Unbound Integer SpinBox (backed by python `int`)
## Contributing

View File

@@ -1,6 +1,5 @@
# QRangeSlider
# Sliders
**The missing multi-handle range slider widget for PyQt & PySide**
![slider](images/slider.png)
@@ -13,9 +12,7 @@
------
## API
To create a slider:
## Range Slider
```python
from qwidgets import QRangeSlider
@@ -86,7 +83,7 @@ These options are in addition to the Qt QSlider API, and control the behavior of
| `barIsRigid` | `setBarIsRigid` | `bool` | `True` | <small>Whether bar length is constant or "elastic" when dragging the bar beyond min/max.</small> |
------
## Examples
### Examples
These screenshots show `QRangeSlider` (multiple handles) next to the native `QSlider`
(single handle). With no styles applied, `QRangeSlider` will match the native OS
@@ -148,23 +145,24 @@ QRangeSlider {
</details>
### macOS
#### macOS
##### Catalina
![mac10](images/demo_darwin10.png)
##### Big Sur
![mac11](images/demo_darwin11.png)
### Windows
#### Windows
![window](images/demo_windows.png)
### Linux
#### Linux
![linux](images/demo_linux.png)
## Labeled Sliders
This package also includes two "labeled" slider variants. One for `QRangeSlider`, and one for the native `QSlider`:
@@ -195,7 +193,6 @@ Where/whether labels are shown adjacent to slider handles.
- `LabelPosition.LabelsRight` (alias for `LabelPosition.LabelsAbove`)
- `LabelPosition.LabelsLeft` (alias for `LabelPosition.LabelsBelow`)
#### `edgeLabelMode`/`setEdgeLabelMode`
**type:** `QLabeledRangeSlider.EdgeLabelMode`
@@ -208,7 +205,6 @@ Where/whether labels are shown adjacent to slider handles.
- `EdgeLabelMode.LabelIsRange`: edge labels shown the min/max values
- `EdgeLabelMode.LabelIsValue`: edge labels shown the slider range
#### fine tuning position of labels:
If you find that you need to fine tune the position of the handle labels:
@@ -218,7 +214,6 @@ If you find that you need to fine tune the position of the handle labels:
### `QLabeledSlider`
![labeled_range](images/labeled_qslider.png)
```python
@@ -233,3 +228,11 @@ If you encounter any problems, please [file an issue] along with a detailed
description.
[file an issue]: https://github.com/napari/qwidgets/issues
## Float Slider
just like QSlider, but supports float values
```python
from qwidgets import QDoubleSlider
```

View File

@@ -1,4 +1,3 @@
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist = py{37,38,39}-{linux,macos,windows}-{pyqt5,pyside2,pyqt6,pyside6},py37-{linux,macos,windows}-{pyqt511,pyside511}
toxworkdir=/tmp/.tox