File: qquantity.md

package info (click to toggle)
superqt 0.7.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,320 kB
  • sloc: python: 9,108; makefile: 16; sh: 12
file content (33 lines) | stat: -rw-r--r-- 488 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# QQuantity

A widget that allows the user to edit a quantity (a magnitude associated with a unit).

!!! note

    This widget requires [`pint`](https://pint.readthedocs.io):

    ```
    pip install pint
    ```

    or

    ```
    pip install superqt[quantity]
    ```

```python
from qtpy.QtWidgets import QApplication

from superqt import QQuantity

app = QApplication([])
w = QQuantity("1m")
w.show()

app.exec()
```

{{ show_widget(150) }}

{{ show_members('superqt.QQuantity') }}