Add 'extras/qtpy/' from commit 'f9c100f2e49fc28a43d3938ef96ce3b98abd8344'
[git-cola.git] / extras / qtpy / README.md
blob0ee40584e022318520354f2f7bffd888e15af917
1 ## QtPy: Abtraction layer for PyQt5/PyQt4/PySide
3 **QtPy** (pronounced *'cutie pie'*) is a small abstraction layer that lets you
4 write applications using a single API call to either PyQt or PySide.
6 It provides support for PyQt5, PyQt4 and PySide using the PyQt5 layout (where
7 the QtGui module has been split into QtGui and QtWidgets).
9 Basically, you write your code as if you were using PyQt5 but import Qt modules
10 from `qtpy` instead of `PyQt5`.
13 ### Attribution and acknowledgements
15 This project is based on the [pyqode.qt](https://github.com/pyQode/pyqode.qt)
16 project and the [spyderlib.qt](https://github.com/spyder-ide/spyder/tree/2.3/spyderlib/qt)
17 module from the [Spyder](https://github.com/spyder-ide/spyder) project, and
18 also includes contributions adapted from
19 [qt-helpers](https://github.com/glue-viz/qt-helpers), developed as part of the
20 [glue](http://glueviz.org) project.
22 Unlike `pyqode.qt` this is not a namespace package, so it is not tied
23 to a particular project or namespace.
26 ### License
28 This project is licensed under the MIT license.
31 ### Requirements
33 You need PyQt5, PyQt4 or PySide installed in your system to make use
34 of QtPy. If several of these packages are found, PyQt5 is used by
35 default unless you set the `QT_API` environment variable.
37 `QT_API` can take the following values:
39 * `pyqt5` (to use PyQt5).
40 * `pyqt` or `pyqt4` (to use PyQt4).
41 * `pyside` (to use PySide).
44 ### Installation
46 ```bash
47 pip install qtpy
48 ```
52 ```bash
53 conda install qtpy
54 ```