aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2019-04-25 11:47:17 +0200
committerCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2019-08-20 15:27:46 +0200
commitd0c71a3ad09293874cf703fefcfcc60463b596a4 (patch)
treefd8144c91492e9aa43daa1fb17a4f08c080e7cdf
parent074e7b39585857b37ae41016e872d962da5ed59a (diff)
Docs: Add missing pysideversion code
The file pysideversion was removed, but the Getting Started page was still referencing it. This change add the code that used to be in pysideversion.rst Change-Id: Ie80b2cd95cac6f50e52be2556d53de209422f26e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--sources/pyside2/doc/gettingstarted.rst22
1 files changed, 18 insertions, 4 deletions
diff --git a/sources/pyside2/doc/gettingstarted.rst b/sources/pyside2/doc/gettingstarted.rst
index cc915a5cb..0ee6a9173 100644
--- a/sources/pyside2/doc/gettingstarted.rst
+++ b/sources/pyside2/doc/gettingstarted.rst
@@ -30,11 +30,25 @@ Testing the Installation
========================
Now that you have |project| installed, you can test your setup by running the following Python
-constructs to print version information:
+constructs to print version information::
-.. include:: pysideversion.rst
- :start-line: 5
- :end-line: 32
+ import PySide2.QtCore
+
+ # Prints PySide2 version
+ # e.g. 5.11.1a1
+ print(PySide2.__version__)
+
+ # Gets a tuple with each version component
+ # e.g. (5, 11, 1, 'a', 1)
+ print(PySide2.__version_info__)
+
+ # 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 PySide2
+ # e.g. (5, 11, 2)
+ print(PySide2.QtCore.__version_info__)
Creating a Simple Application
=============================