diff options
author | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-10-19 10:28:39 +0200 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-10-19 08:48:36 +0000 |
commit | 6f2f10e84a030bd46f336b00a0618e7ed2a87d12 (patch) | |
tree | d20fab12301bb8c8817682387d5056d895739802 /sources/pyside2/doc | |
parent | e10339acbdaaf640384c2eae3e7ce5c792605cfb (diff) |
Update documentation
A couple of comments were outdated, and there was
mixed information related to PySide, PySide2 and Qt for Python.
Task-number: PYSIDE-691
Change-Id: I34c17822fc09e9027ee1c0a082ed9a27a5154996
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2/doc')
-rw-r--r-- | sources/pyside2/doc/gettingstarted.rst | 18 | ||||
-rw-r--r-- | sources/pyside2/doc/pysideapi2.rst | 7 | ||||
-rw-r--r-- | sources/pyside2/doc/pysideversion.rst | 14 | ||||
-rw-r--r-- | sources/pyside2/doc/tutorials/index.rst | 4 |
4 files changed, 23 insertions, 20 deletions
diff --git a/sources/pyside2/doc/gettingstarted.rst b/sources/pyside2/doc/gettingstarted.rst index f24051c18..0a58226a7 100644 --- a/sources/pyside2/doc/gettingstarted.rst +++ b/sources/pyside2/doc/gettingstarted.rst @@ -4,15 +4,19 @@ Getting Started To get started with |project|, install the following prerequisites: -* Python v3.5 or later -* libclang v3.9 or later -* Optional: a virtual environment, such as `venv <https://docs.python.org/3/library/venv.html>`_ or `virtualenv <https://virtualenv.pypa.io/en/stable/installation>`_ +* Python 3.5+ or 2.7 +* libclang 5.0+ (for Qt 5.11) or 6.0+ (for Qt 5.12) +* Recommended: a virtual environment, such as `venv <https://docs.python.org/3/library/venv.html>`_ or `virtualenv <https://virtualenv.pypa.io/en/stable/installation>`_ With these installed, you are ready to install the |project| packages using the pip wheel. Run the following command from your command prompt to install:: - python -m pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.11/latest pyside2 --trusted-host download.qt.io + pip install PySide2 # For the latest version on PyPi + +or:: + + pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.12/latest pyside2 --trusted-host download.qt.io Now that you have |project| installed, you can test your setup by running the following Python constructs to print version information: @@ -44,16 +48,12 @@ guide you through the development process: def __init__(self): super().__init__() - self.hello = ["Hallo Welt", "你好,世界", "Hei maailma",\ - "Hola Mundo", "Привет мир"] + self.hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"] self.button = QtWidgets.QPushButton("Click me!") self.text = QtWidgets.QLabel("Hello World") self.text.setAlignment(QtCore.Qt.AlignCenter) - self.text.setFont(QtGui.QFont("Titillium", 30)) - self.button.setFont(QtGui.QFont("Titillium", 20)) - self.layout = QtWidgets.QVBoxLayout() self.layout.addWidget(self.text) self.layout.addWidget(self.button) diff --git a/sources/pyside2/doc/pysideapi2.rst b/sources/pyside2/doc/pysideapi2.rst index f1cc13391..e552bf21d 100644 --- a/sources/pyside2/doc/pysideapi2.rst +++ b/sources/pyside2/doc/pysideapi2.rst @@ -1,12 +1,15 @@ .. _pysideapi2: -|pymodname| API -*************** +Qt for Python API +******************* One of the goals of |pymodname| is to be API compatible with PyQt5, with certain exceptions. For example, |pymodname| will not export C++ components that are marked as deprecated by Qt. +The latest considerations and known issues will be also reported +in the `wiki <https://wiki.qt.io/Qt_for_Python/Considerations>`_. + __hash__() function return value ================================ diff --git a/sources/pyside2/doc/pysideversion.rst b/sources/pyside2/doc/pysideversion.rst index 24afba12d..bde48b39e 100644 --- a/sources/pyside2/doc/pysideversion.rst +++ b/sources/pyside2/doc/pysideversion.rst @@ -8,20 +8,20 @@ numbers using the following python constructs: import PySide2.QtCore - # Prints PySide version - # e.g. 1.0.2 + # Prints PySide2 version + # e.g. 5.11.1a1 print(PySide2.__version__) # Gets a tuple with each version component - # e.g. (1, 0, 2, 'final', 1) + # e.g. (5, 11, 1, 'a', 1) print(PySide2.__version_info__) - # Prints the Qt version used to compile PySide - # e.g. "5.11.0" + # Prints the Qt version used to compile PySide2 + # e.g. "5.11.2" print(PySide2.QtCore.__version__) - # Gets a tuple with each version components of Qt used to compile PySide - # e.g. (5, 11, 0) + # Gets a tuple with each version components of Qt used to compile PySide2 + # e.g. (5, 11, 2) print(PySide2.QtCore.__version_info__) diff --git a/sources/pyside2/doc/tutorials/index.rst b/sources/pyside2/doc/tutorials/index.rst index 18bac57fd..c09b48ab5 100644 --- a/sources/pyside2/doc/tutorials/index.rst +++ b/sources/pyside2/doc/tutorials/index.rst @@ -1,5 +1,5 @@ -PySide examples and tutorials -***************************** +Qt for Python examples and tutorials +************************************* A collection of examples and tutorials with "walkthrough" guides are provided with |project| to help new users get started. These |