mirror of
https://github.com/pyapp-kit/superqt.git
synced 2026-01-04 19:31:24 +01:00
update readme
This commit is contained in:
10
README.md
10
README.md
@@ -1,6 +1,6 @@
|
||||
# qwidgets
|
||||
|
||||
**Missing widgets for PyQt/PySide**
|
||||
### Missing widgets for PyQt/PySide
|
||||
|
||||
[](https://github.com/napari/qwidgets/raw/master/LICENSE)
|
||||
[](https://pypi.org/project/qwidgets)
|
||||
@@ -9,14 +9,14 @@ Version](https://img.shields.io/pypi/pyversions/qwidgets.svg?color=green)](https
|
||||
[](https://github.com/napari/qwidgets/actions/workflows/test_and_deploy.yml)
|
||||
[](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
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# QRangeSlider
|
||||
# Sliders
|
||||
|
||||
**The missing multi-handle range slider widget for PyQt & PySide**
|
||||
|
||||

|
||||
|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
##### Big Sur
|
||||
|
||||

|
||||
|
||||
### Windows
|
||||
#### Windows
|
||||
|
||||

|
||||
|
||||
### Linux
|
||||
#### Linux
|
||||
|
||||

|
||||
|
||||
|
||||
## 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`
|
||||
|
||||
|
||||

|
||||
|
||||
```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
|
||||
```
|
||||
Reference in New Issue
Block a user